1s and 0s Revisited: The Digital Stream

In this chapter, readers are introduced to pulse-width modulation (PWM) and get a chance to take a closer look at this digital concept and how to apply the technique to simulate analog signals as well as to control other digital systems. After spending a bit of time demystifying analogWrite(), the chapter turns focus to the application of square wave to generate noise, tone, and even music melodies with the piezo buzzer. Closing out the chapter, readers get to connect the dots to create a complete input/output signal chain to create their own musical instruments.