CHAPTER 11

image

Square Waves

By far, the simplest way for an electronic circuit to produce an audible sound is by generating a square wave. As you saw in the previous chapter, a square wave is the infinite sum of odd harmonics. However, as far as Arduino is concerned, it is achieved by putting a pin high and then a short time after, putting it low. This will generate a signal that can be turned into a sound by putting it through a loud speaker. There are many ways of generating this signal, some are more efficient than others .

Starting Off Simply

Before we start we need to get the hardware right. In order to hear a sound it has to be passed to ...

Get Arduino Music and Audio Projects 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.