This class we made another Arduino project which is a little bit more complex than last one. I chose the « Keyboard Instrument » project in the Arduino Guidance book. There’re four switches in this small keyboard and the piezo will alarm in different tones when I press different switches.
1. All materials I need
2. Build the circuit
Connect the first switch directly to the power. Connect the second, third and fourth switches to power through a 220-ohm, 10-kilohm and 1-megohm resistors respectively. Connect all the switches’ outputs together in one junction. Connect this junction to ground with a 10-kilohm resistor and also connect it to Analog in 0.
3. Create the code
You may need to test and adjust the keyVal range of each tone.
4. Final Product
Play with this new toy!
By the way, in this class we also discussed possibilities that what technology we can apply to a badge.