Romeno and I initially had trouble coming up with a solid plan for what we should do. We thought of making some woodwind instruments, but we didn’t know how the servo would contribute towards this sort of project. We then decided that we wanted to do something like drumming, where you touch or hit something and it’ll make a noise.
I don’t remember why, but for some reason, we decided to use crocodile clips to clip onto some metal objects. Romeno coded (see his post) so that when touched, the buzzer and LED would light up. We first tried this project by clipping a coin to the crocodile clips and putting it on the servo so that it would spin, kind of like a record player. We wanted to imitate a stick-like object so that it would be like drumsticks but rather than hitting the coin, we kept the aluminium stick stable so that the coin would spin and touch the stick and make the buzzer sound. This is shown in the video below.
After that, we wanted to do something that was cooler and provided more than one sound. So rather than attaching the crocodile clips to the coin and making it spin on the servo, we attached it to a Sprite can so that when we touched the can, it would make the LED light up and the buzzer sound. This is shown in the video below.
We then did the same thing with another can but coded it so that the two cans, when touched, would play a different note (see Romeno’s code). We tried creating more cans that would make notes so that it would kind of resemble a piano, but we couldn’t figure out why when we tried to add another can/note, nothing would work. Therefore, we left it with only two cans/notes.
[UPDATE] We got 4 cans/notes to work/play, yay!!!
We couldn’t figure out what to do with the servo, but we thought that hey since we already have a piano-like instrument, why not make a set of drums to go with it! We attached a long ruler-like object that we found in the junk shelf onto the servo and used a cookie box as the drum kit so that when hit the lid and the bottom of the box, they would make sounds that could potentially resemble the bass drum and the hi-hat. The servo speed can be changed using the potentiometer so the beat could be changed to match the speed that you want to play the “piano” in. The code for that is shown below:
Our homemade instrument kit is now, therefore, complete! Below is a video of it!