Friday, January 20, 2012

Arduino class notes, class 1

These are the class notes for a 4-part, 8-hour class Introductory Arduino class I'm teaching.  The class consists mostly of programmers fluent in C, which means we won't have to spend much time on the software side of things.  A few of the people have some hardware experience; the majority don't.  A couple of people are actually experts cleverly disguised as students, helping me out!

We're using the Sparkfun Inventor's Kit and tutorial.  Each student is provided with a kit. I bought one of these for myself last year and thought it was a pretty nice kit. (update:  The new version of the kit is even better.  Onward and Upward!)  After the last class I'll provide a wrapup with any notes regarding what pieces were more and less useful, and what supplemental pieces might be used.

SparkFun Inventors Kit
Preliminary Assignment

Class Breakdown

These are the four areas we'll be focussing on.
  • general electronics -- electricity, circuits, etc.
  • arduino specific electronics -- input, output, digital/analog control, etc.
  • arduino programming and libraries -- C coding, libraries for doing interesting things
  • the big picture -- interfacing and combining the lower-level pieces of knowledge into useful or interesting projects
Topics Covered
  • electrical circuits: much handwaving
  • setting up the boards
  • naming of parts
  • downloading arduino environment
  • running the blink program
  • expanding the blink program to tricolor led
  • Needed to spend more time on breadboards, how they're laid out, how to complete a circuit with them, what the power lines are used for.
  • The Sparkfun project templates are nice, but don't bother attaching them to the breadboard.
  • Because you won't attach them to the breadboard, ignore the two-pin headers on the corners of the board.  They're only used to attach the paper template to the breadboard.
  • We had one kit that had trouble making a connection -- it never showed up on the TTY list.  It turns out to be a faulty USB cable.  Fortunately this happened to one of our more intrepid students who diagnosed the problem right away.
  • All the other hardware worked with no problem.
  • The colors of the wires have no intrinsic meaning.  You typically use red and black for power and ground, but interestingly the Sparkfun kit has no red or black wires.
  • Cover the software portion of the blink lab first.  It looks like the Arduino people test the boards with the blink program, so when you plug everything in for lab 1 the LED starts blinking before the students do anything.
  • If you have access to the boards before you pass them out, it might be nice to download a null program to avoid this.
  • The wiring diagram for the first blink lab has a wire to the power bus that serves no purpose.  This should be eliminated, since it caused students confusion as to what it was doing (nothing).
Khan Academy Circuit Tutorials

This is homework for the next class.  Be cool, sign up for a Khan Academy account, and register me as your coach! My ID is
Next Week

We'll continue with:
  • more on electrical theory, courtesy of Khan Academy.
  • Ohm's Law <-- we must obey it!
  • current, voltage, resistance
  • Some resistor experiments
and more parts (won't get to all of these, will continue in class 3)
  • switches
  • sensors
  • potentiometers
  • motors
  • servos
  • relays
  • pizeo buzzer
  • serial I/O
and here's where it will get interesting:

  • Combining Input + Output -- the basis of interesting projects!

1 comment: