The Music Box

The Arduino has the ability to generate a multitude of sounds and tones, and a combination of them can produce snippets of musical melodies. Creating sounds or tones is relatively easy using the tone() instruction along with its code library. This chapter will show how you can use the tone instruction and its library to generate sounds and melodies. This chapter will use the physical-computing techniques discussed in previous chapters in the creation of a human-interactive electronic music box. Figure 6-1 shows the parts required for the hands-on projects and experiments.

Figure 6-1. Parts required for the music box projects ...

Get Learn Electronics with Arduino now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.