Ever scared to go karaoke with your friends because you can't sing? Don't worry, our piezo buzzer has got you covered!
We have created Singing Raybow, a cute little device that can sing beautiful notes. By rotating the potentiometer, we can change the pitch of the piezo buzzer, thus creating variating tones. With a newly incorporated tilt switch, the piezo buzzer will not be constantly singing. When the breadboard is tilted to be perpendicular to the ground, then the piezo buzzer will stop.
First, set up your launchpad and get familiarized with Energia!
Then, connect the potentiometer and the piezo buzzer according to the schematics below using jumper wires. (connect potentiometer in series with piezo buzzer)
Finally, make adjustments to the code (hint: many if statements) to make the piezo buzzer sing customizable notes. There are pre-defined notes for all the keys in piano, and we could choose what note we want to play for different positions of the potentiometer.
Comments
Please log in or sign up to comment.