Lesson Plan - sgould/naps_code_club GitHub Wiki

Week 1

  • Introduction to Arduino hardware (and difference between running a program on the Arduino and your computer)
  • Familiarity with the Arduino programming environment (IDE); compiling and uploading code
  • Introduction to the C programming language. Special note of semi-colons, braces and case-sensitivity
  • Arduino Sketch programming concepts
    • setup() and loop() functions
    • pinMode, digitalWrite and delay
  • Run blink example and get kids to change speed of flashing and which LED flashes
  • Extension exercise: blink multiple LEDs in order

Week 1 Handout

Week 2

Programming concepts: variables and statements, inputting text (Serial.readString) and numbers (Serial.parseInt), printing output (writeln). Serial interface to Arduino. Hello World example. Start writing guessing game.

Week 2 Handout

Week 3

Programming concepts: conditional execution (if-then-else). Generating random numbers. Continue writing guessing game through serial interface.

Continuation of Week 2 Handout

Week 4

Robotic concepts: pins and I/O (analog and digital). Extend guessing game to use red, yellow and green LEDs (red too high, green too low, yellow right). Play around with different flashing patterns (e.g., red and green for right).

Week 5

Programming concepts: loops (for and while). Robotic concepts: littleBits proximity sensor.

Week 6

Programming concepts: functions and scope (global vs local variables). Robotic concepts: littleBits motor drive.

Weeks 7 and 8

Programming concepts: libraries. Robotics concepts: circuit diagrams. Final project: program robot to move forward until it senses an obstacle, reverses a little, turns 90 degrees then proceeds forwards again.