Audio animatronics! By adding a voice or sound effects to your robot you can make a cool interactive project.
This is one of the few outputs that does not go through the Crickit's seesaw helper chip. Instead, the audio is played directly from the microcontroller board and the Crickit amplifies it!
The onboard amplifier is a mono "Class D" audio amp with BTL (Bridge Tied Load) output.
That means you cannot plug the speaker output into another amplifier, it must connect directly to a speaker!
You can use just about any 4 to 8Ω speaker (6 Ω is OK too, just not as common). The amplifier can drive up to 3 Watts into 4Ω and 1 Watt into 8Ω. That means its ok to drive a 5 Watt speaker, it just wont be as loud as it could be with a bigger amp (but you wont damage the amp). You can also drive speakers that are smaller, like an 8Ω 0.5 W but make sure you don't turn the audio volume potentiometer up, as it could damage the speaker by overpowering it.
If you are using a Crickit with Circuit Playground Express (CPX), the Crickit becomes an amplified extension of the regular audio out. The sound is very clear and the volume can be higher than the CPX on-board speaker. Below I've taken a cute song snippet and reduced the volume from a previous value of
34 so one's ears don't hurt when it starts. If the slide switch is moved left (towards the on-board speaker on CPX), the song will play, moving the switch right silences it. If you think the speed of the sound (the tempo) is too fast, press button A to slow it down. If you think the tempo is too slow, press the B button.
You can download the code by clicking this link to link to the MakeCode website.
Check out all the music blocks, you can have Crickit using sounds in projects with just a couple of clicks!
Here is the song code for micro:bit: