CHAPTER 6

image

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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.