HowTo-Color (8) / Hacking Electronics / Simon Monk / 236-3 / Chapter 8
208
Hacking Electronics Figure 8-17 The schematic diagram for the Arduino Egg and Spoon
the Arduino. The LED/resistor combo is the same as we used in Chapter 6. The positive end goes to digital pin 8 on the Arduino and the negative end to GND. The buzzer fits between pins D3 and D6—D6 being connected to the positive end of the buzzer. If the pins on your buzzer are at a different spacing, then you can pick other pins, but remember to change the variables “gndPin2” and “buzzerPin” to whatever pins you end up using. Both of the accelerometer modules will fit in the Arduino sockets A0 to A5, as shown in Figure 8-18. However, their pin allocations are quite different. The project is powered from a 9V battery using an adapter, and the Arduino and battery are attached to the spoon with rubber bands.
Figure 8-18 The components attached to the Arduino
Software There are two versions of the sketch provided: “egg_and_spoon_adafruit” and “egg_and_spoon_freetronics”. Make sure you get the right one, and then program the Arduino with it BEFORE you attach the accelerometer.
08-ch08.indd 208
1/2/13 12:29 PM