This small Arduino project uses something called a resistor ladder. This allows us to read multiples of switches and can prove to be very useful if we run short of digital inputs in any other scenario. The switches are connected in parallel and in this case are connected to analog 0 on the Arduino board (Fig 1). In the way this has been set up, a different voltage level will be sent to the input pin depending on which switch has been pressed. (more about resistors here - https://sites.google.com/sheffield.ac.uk/diamond-electronics/1-basic-knowledge/resistors-in-series-and-parallel ) Put the switches onto the breadboard as shown in Fig 2 and see if you can work out what would happen if you altered the resistor values. What will occur if you press more than one switch at once?
Fig 1
Fig 2
Fig 3
Keyboardvid.mp4
Fig 3 shows a possible program for the keyboard. If you haven't used them before, you might wish to research the use of integers. See if you can work out how to add more switches to give a more useful instrument.