Sound

The ItsyBitsy can play high quality sound out of the DAC pin. It takes a few parts to make sound: a .wav sound file, an audio amplifier, and a speaker.

Get a file on the ItsyBitsy

Record or find some .wav file audio clips. A nice source is the free website. Copy the files to the ItsyBitsy drive, the files must be small.

Wire up the audio amplifier and speaker

The speaker requires an amplifier to produce loud and clear sound. Connect the amplifier ground to ground, 5V to 5V, VIN to DAC. I have pre-plugged the wires from the speaker into the amplifier.

Image of sound circuit Speaker circuit

Play the sound

Example code

Play the sound and use potentiometer volume

Write some code that plays a sound when the accelerometer is tapped, the sound is played.

Solution