From f8bc7293b058dec9f4d832822e0908c4b5c18bd2 Mon Sep 17 00:00:00 2001 From: David Russell Date: Tue, 23 Jul 2019 10:00:43 +0700 Subject: [PATCH] Slide deck design updates. --- Day01/PITCHME.md | 201 +++++++++++++++----------------- PITCHME.yaml | 3 +- assets/css/PITCHME.css | 1 - assets/src/day01/multi-leds.cpp | 31 +++++ assets/src/day01/on-off.cpp | 20 ++++ assets/src/sample.sql | 9 -- 6 files changed, 147 insertions(+), 118 deletions(-) create mode 100644 assets/src/day01/multi-leds.cpp create mode 100644 assets/src/day01/on-off.cpp delete mode 100644 assets/src/sample.sql diff --git a/Day01/PITCHME.md b/Day01/PITCHME.md index ef671fc..e33f883 100644 --- a/Day01/PITCHME.md +++ b/Day01/PITCHME.md @@ -1,6 +1,8 @@ # Welcome +++ +@snap[north span-100] ## Introductions +@snapend * Jackie Gerstein * Technology teacher @@ -8,7 +10,9 @@ * I build and race homemade electric go karts * Who are you? +++ +@snap[north span-100] ## Expectations +@snapend * Be supportive and respectful of everyone here * Clean up your work space @@ -17,54 +21,77 @@ --- # What we'll be doing +++ +@snap[north span-100] ## Daily +@snapend + * Non-computer activity * Learn about coding and electronics * Discuss connections to [UNSDGs](https://www.un.org/development/desa/disabilities/envision2030.html) * Work towards capstone project +++ -## Week 1: +@snap[north span-100] +## Week 1 +@snapend + * Background knowledge for Arduino * Start planning capstone project * Mentor meeting +++ -## Week 2: +@snap[north span-100] +## Week 2 +@snapend + * Continue building Arduino skills * Breakout sessions for additional skills * Work on capstone project * Mentor meeting * Present capstone --- +@snap[north span-100] ## Maker Mindset +@snapend * Challenge yourself * Learn from your mistakes * Remember that you can shape your own world ---?survey=https://docs.google.com/forms/d/e/1FAIpQLSdhMRsbCyKeCVT7SU2JXZ3pZU89SK3aXN-3IaaTvlKdZpYpbQ/viewform?usp=sf_link --- -# Computational Thinking +## Computational +# Thinking +++ +@snap[north span-100] ## Step 1 +@snapend -Choose a simple activity, such as placing an object in a specified location +Choose a simple activity, such as
placing an object in a specified location +++ +@snap[north span-100] ## Step 2 +@snapend -Write out clear directions for this activity. Put your name on them! +Write out clear directions for this activity.
Put your name on them! +++ +@snap[north span-100] ## Step 3 +@snapend I will collect and redistribute your directions +++ +@snap[north span-100] ## Step 4 +@snapend Take turns with your partner, following each other's directions as literally as possible, but be safe. --- +@snap[north span-100] ## Review +@snapend +
* Did your partner do what you intended? * Did your partner have to make any decisions? How? * Did your partner use any external information, such as the location of chairs? @@ -72,59 +99,80 @@ Take turns with your partner, following each other's directions as literally as * Did your partner affect their environment at all? * Did other people affect your partner's ability to carry out the task? --- +@snap[north span-100] ## Coding +@snapend +
+@ul[list-spaced-bullets](false) * A precise, repeatable set of directions for a computer to follow * Programming languages are more precise than human languages * Many languages exist, but core concepts are the same for all +@ulend --- # Arduino +++ +@snap[north span-100] ## The Language +@snapend +@ul[list-spaced-bullets](false) * Very human-friendly * *Compiles* to C++ * Many built-in *functions* for working with hardware +@ulend +++ +@snap[north span-100] ## The Hardware +@snapend +
+@ul[list-spaced-bullets](false) * *Microcontroller* with additional electronics to make it easy to use * Many variants exist - we'll look at some tomorrow * Designed to make it easy to control *inputs* and *outputs* +@ulend --- +@snap[north span-100] # Blink! +@snapend -Blink is the "Hello World" of Arduino - it's nearly everybody's first program +Blink is the "Hello World" of Arduino
- it's nearly everybody's first program +++?image=assets/img/Day01/blinkcircuit.PNG&size=contain -+++?image=assets/img/Day01/blinkcircuit.PNG&opacity=30&size=contain -@snap[north-west text-left] ++++?image=assets/img/Day01/blinkcircuit.PNG&opacity=100&position=bottom&size=auto 50% +@snap[north span-100] ## Troubleshooting -@snapend -@snap[west text-left span-50] - +
+@ul[text-08](false) +- Long leg of LED is on the left +- Resistor is orange-orange-brown-gold +- Make sure you didn't mix up your wires +@ulend @snapend +++ -@snap[west text-left span-40] -## Arduino IDE - +@snap[north-west span-100 h3-blue] +### Arduino IDE @snapend -@snap[east span-60] +@snap[west span-40] +@ul[list-square-bullets](false) +- Compile +- Upload +- New +- Open +- Save +@ulend +@snapend + +@snap[south-east span-65] ![](assets\img\Day01\arduinoIDE.PNG) @snapend +++ +@snap[north span-100] Save and upload to your Arduino. What happens? +@snapend + ``` // Declare and initialize a variable const int ledPin = 13; @@ -165,97 +213,38 @@ void loop(){ +++ Is it behaving as you'd expect? Why/why not? +++ -The Arduino can turn things on and off faster than we can see, so we need to delay -``` -// Declare and initialize a variable -const int ledPin = 13; +@snap[west span-30] +The Arduino can turn things on and off faster than we can see, so we need to delay +@snapend -// Everything between {} will run once when the Arduino starts -void setup(){ - // Set ledPin (which is 13) to be an OUTPUT - pinMode(ledPin, OUTPUT); -} +@snap[east span-65] +@code[cpp zoom-07](assets/src/day01/on-off.cpp) +@snapend -// Everything betwen {} will run in a loop -void loop(){ - // Tell ledPin to turn on at full voltage - digitalWrite(ledPin, HIGH); - // wait 500 ms (half a second) - delay(500); - // Tell ledPin to turn off/go to ground - digitalWrite(ledPin, LOW); - // wait 500 ms (half a second) - delay(500); -} -``` --- -``` -// Declare and initialize a variable -const int ledPin = 13; -// Everything between {} will run once when the Arduino starts -void setup(){ - // Set ledPin (which is 13) to be an OUTPUT - pinMode(ledPin, OUTPUT); -} +@code[cpp](assets/src/day01/on-off.cpp) -// Everything betwen {} will run in a loop -void loop(){ - // Tell ledPin to turn on at full voltage - digitalWrite(ledPin, HIGH); - // wait 500 ms (half a second) - delay(500); - // Tell ledPin to turn off/go to ground - digitalWrite(ledPin, LOW); - // wait 500 ms (half a second) - delay(500); -} -``` @[1, 4, 6, 10, 12, 14, 16, 18] -@[5-8] -@[11-20] -@[2] -@[7] -@[13, 17] -@[15, 19] +@[5-8,zoom-15] +@[11-20,zoom-14] +@[2,zoom-20] +@[7,zoom-20] +@[13,17,zoom-20] +@[15,19,zoom-20] --- +@snap[north span-100] ## Hack it! +@snapend -Try making modifications. Can you add another LED? Change the way it blinks? Send a message in Morse code? +Try making modifications.

Can you add another LED? Change the way it blinks? Send a message in Morse code? --- -## Multiple LEDs -``` -// Declare and initialize variables -int red = 6; -int green = 5; -int blue = 3; -int t = 500; - -void setup(){ - pinMode(red, OUTPUT); - pinMode(green, OUTPUT); - pinMode(blue, OUTPUT); -} +@snap[west span-28 h3-blue] +### Multiple
LEDs +@snapend -void loop(){ - // blink red - digitalWrite(red, HIGH); - delay(t); - digitalWrite(red, LOW); - delay(t); - - // blink green - digitalWrite(green, HIGH); - delay(t); - digitalWrite(green, LOW); - delay(t); - - // blink blue - digitalWrite(blue, HIGH); - delay(t); - digitalWrite(blue, LOW); - delay(t); -} -``` \ No newline at end of file +@snap[east span-66] +@code[cpp zoom-12](assets/src/day01/multi-leds.cpp) +@snapend diff --git a/PITCHME.yaml b/PITCHME.yaml index db10fe6..1e295fc 100644 --- a/PITCHME.yaml +++ b/PITCHME.yaml @@ -20,6 +20,5 @@ highlight : tomorrow theme-override : assets/css/PITCHME.css published : true -logo: assets/img/logo.png +# logo: assets/img/logo.png footnote: "GitPitch Theme Template Quickstart" - diff --git a/assets/css/PITCHME.css b/assets/css/PITCHME.css index edef5d0..109738f 100644 --- a/assets/css/PITCHME.css +++ b/assets/css/PITCHME.css @@ -7,4 +7,3 @@ border-radius: 16px; border: 1px dashed #C0C0C0 !important; } - diff --git a/assets/src/day01/multi-leds.cpp b/assets/src/day01/multi-leds.cpp new file mode 100644 index 0000000..cc95134 --- /dev/null +++ b/assets/src/day01/multi-leds.cpp @@ -0,0 +1,31 @@ +// Declare and initialize variables +int red = 6; +int green = 5; +int blue = 3; +int t = 500; + +void setup(){ + pinMode(red, OUTPUT); + pinMode(green, OUTPUT); + pinMode(blue, OUTPUT); +} + +void loop(){ + // blink red + digitalWrite(red, HIGH); + delay(t); + digitalWrite(red, LOW); + delay(t); + + // blink green + digitalWrite(green, HIGH); + delay(t); + digitalWrite(green, LOW); + delay(t); + + // blink blue + digitalWrite(blue, HIGH); + delay(t); + digitalWrite(blue, LOW); + delay(t); +} diff --git a/assets/src/day01/on-off.cpp b/assets/src/day01/on-off.cpp new file mode 100644 index 0000000..6fe8c65 --- /dev/null +++ b/assets/src/day01/on-off.cpp @@ -0,0 +1,20 @@ +// Declare and initialize a variable +const int ledPin = 13; + +// Everything between {} will run once when the Arduino starts +void setup(){ + // Set ledPin (which is 13) to be an OUTPUT + pinMode(ledPin, OUTPUT); +} + +// Everything betwen {} will run in a loop +void loop(){ + // Tell ledPin to turn on at full voltage + digitalWrite(ledPin, HIGH); + // wait 500 ms (half a second) + delay(500); + // Tell ledPin to turn off/go to ground + digitalWrite(ledPin, LOW); + // wait 500 ms (half a second) + delay(500); +} diff --git a/assets/src/sample.sql b/assets/src/sample.sql deleted file mode 100644 index 5a5ca9e..0000000 --- a/assets/src/sample.sql +++ /dev/null @@ -1,9 +0,0 @@ -CREATE TABLE "topic" ( - "id" serial NOT NULL PRIMARY KEY, - "forum_id" integer NOT NULL, - "subject" varchar(255) NOT NULL -); -ALTER TABLE "topic" -ADD CONSTRAINT forum_id -FOREIGN KEY ("forum_id") -REFERENCES "forum" ("id");