If you are looking for the Chapter 5 content for the 2nd Edition of Exploring Arduino, please click here.
Making Sounds
Parts List
- Arduino Uno
- USB A-B Cable
- Jumper Wires
- Pushbuttons (x5)
- Breadboard
- Potentiometer
- 10kΩ Resistors (x4)
- 150Ω Resistor
- 8Ω Loudspeaker
Code
Download Code (1st Edition, Chapter 5)
(Also available on GitHub)
Useful Links
- Pentatonic Scale Entry on Wikipedia
- Arduino tone() Function Reference
- Arduino while loop Reference
- Arduino #define Reference
- Arduino #include Reference
- Arduino array Reference
- Music Synthesis with the SudoGlove
- Advanced Multispeaker Control Tutorial
Errata
- On page 94, when describing how speakers work, it was incorrectly stated that the induced magnetic field causes the pole piece to vibrate up and down. In actuality, the induced magnetic field causes the voice coil to vibrate up and down.
Color Wiring Diagrams
Videos
Listen to a demo of the musical tune created in the chapter:
Watch a demo of the pentatonic piano created in the chapter: