An Ardiuno Keyboard
I’m working through the arduino project book.
Project seven is a simple keyboard. It uses an arrangement of resistors and switches feeding into a single analog input called a resistor ladder. This is a helpful technique if you are low on digital inputs.
The switches are connected in parallel to analog zero. Frequencies are played from a piezo depending on the voltage level passing through the input pin. Most of the switches connect to power through a different resistor therefore creating a unique voltage level when each switch or combination of switches are pressed.
As well as learning what a resistor ladder is, in this project I also learnt what an array is. An array stores different related values under one name and this is what is used in this project to easily store the list of frequencies played by the piezo.
As all the resistors are not perfectly accurate I adjusted the range of the values appropriately using the serial monitor until everything worked fine.