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

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