Arduino Intro Labs for Tangible Computing
10. Lessons Learned




10.1 Things to change/fix

Here are my notes on how things went the first time we did the labs, and what to change.

10.2 General

We should adopt some coding style conventions. Not sure which, not sure if there is an Arduino convention.

10.3 Lab 1



Emphasize in wiring up the boards that the actual labels on the rows and columns don't matter, and that they change depending on what patch board you have.

We need pliers available!

The kit box needs to be deep enough to hold an assembled project. It's just a bit too shallow now, although that can be addressed by clipping the leads of some components.

We should have a supply of spare parts when students lose them from their kits.

Introduce the if statement to handle the case where the potentiometer is sending too short a flash interval.

The push buttons should be moved to the second lab. They just increase the complexity of the current one.

10.4 Lab 2



In the wiring diagram, the black ground wire looks like just one, when in fact it is two, with a connection point to the ground bus. This is physically impossible to make, so should have two wires.

The series of chained if statements should be described in terms of a case statement.

To help students attack the problem of extening the number of lights, get them to work backwards. The last if is the default case, and each preceeding if is "more specific". That is, when you work forward through the cases, you have to first handle the special cases that are included in more general cases or they will never get tested.

With hardware and software involved, students have to develop good debugging strategies. You simply cannot hack the code until it works, because the problem may be in the wiring!

10.5 Lab 3

The kit needs a slide switch for turning on and off noisy things like the piezo element!

Explain the map function

In the breadboard diagram add a note that indicates the piezo image on the breadboard is different form the physical device: no red/black wires, the pins have an extra column of space between them.

The pushbutton switch to enable the speaker is an interesting opportunity to discuss hardware/software tradeoffs. Suppose you made the pushbutton a distinct input device, and when it was on, you enabled the speaker. How would this complicate the code? Would it give you any extra flexibility?

10.6 Lab 4

This lab went surprising well, considering how sensitive the LED illumination, sensor, and paper combination is to physical placement, distance, and ambient light.

Every one found that you cannot detect blue. There were a variety of strategies for detecting red, green, and yellow (red + green). So you can use this to illustrate different decision making strategies. All of them successfully detected pink as red. One of the students even had a reasonably reliable orange detector.

One thing to watch out for, make sure that the resistor really is 10k Ohm, and emphasize the color code.
10. Lessons Learned
Arduino Intro Labs for Tangible Computing / Version 1.00 2012-09-24