Assignment 4 – Arduino Project – Keyboard Instrument

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

IMG_2213

2. Build the circuit

IMG_2214

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

Screen Shot 2015-12-17 at 16.24.46

You may need to test and adjust the keyVal range of each tone.

4. Final Product

IMG_1776

Play with this new toy!

 

By the way, in this class we also discussed possibilities that what technology we can apply to a badge.

IMG_1772

Publicités
Publié dans Uncategorized
Web2PDF