Adafruit MP3 Quick Start Guide

MP3 Playback in CircuitPython with Lars the Sloth Puppet
Created by John Park
Last updated on 2021-03-10 01:24:47 PM EST
2 3
3 9 9
11
12 13 14 15 16
17
17 18
19
20 21
21
22 23 23
24
24 24 25 26 26 26
27
28 28 29 29
Guide Contents Overview
Parts Plush Doll Who is Lars?
Build the MP3 Player
Add Header Pins Enable Switch Battery Power Fasten with Hardware Speaker
CircuitPython on Feather M4 Express
Set up CircuitPython Quick Start! Further Information
CircuitPython Libraries
Installing the CircuitPython Library Bundle Example Files
Copying Libraries to Your Board
Example: ImportError Due to Missing Library Library Install on Non-Express Boards Updating CircuitPython Libraries/Examples
Code the MP3 Player
Text Editor Code.py Audio Samples Make Your Own How It Works Test It
Implant the MP3 Player in Puppet
Seam Ripper Feed in the Speaker Bag It USB Jack
© Adafruit Industries https://learn.adafruit.com/mp3-circuitpython-lars Page 2 of 32
Overview
You can now play MP3 files directly in CircuitPython with no dedicated decoding hardware! You'll be able to use this new capability in all sorts of projects, including this creepy Lars the Sloth voice box project!
The benefit of MP3 over other non-compressed file formats, such as WAV, has always been their small file size, meaning you can pack a lot of songs or samples into limited memory. However, decompressing those small files for playback was too taxing for older microcontrollers, so we had to use dedicated decoder chips at an additional cost, including licensing fees.
Thanks to the raw speed of M4, the days of requiring a dedicated MP3 audio decoder chip are behind us. And, since the patents have expired, we can now distribute MP3 playback libraries free of
charge (https://adafru.it/Hey)!
Parts
Adafruit Feather M4 Express - Featuring ATSAMD51
It's what you've been waiting for, the Feather M4 Express featuring ATSAMD51. This Feather is fast like a swift, smart like an owl, strong like a ox-bird (it's half ox,... $22.95 In Stock
Add to Cart
© Adafruit Industries https://learn.adafruit.com/mp3-circuitpython-lars Page 3 of 32
Adafruit Prop-Maker FeatherWing
The Adafruit Feather series gives you lots of options for a small, portable, rechargeable microcontroller board. Perfect for fitting into your next prop build! This FeatherWing will... $9.95 In Stock
Add to Cart
© Adafruit Industries https://learn.adafruit.com/mp3-circuitpython-lars Page 4 of 32
Mini Oval Speaker - 8 Ohm 1 Watt
Hear the good news! This wee speaker is a great addition to any audio project where you need 8 ohm impedance and 1W or less of power. We particularly like... $1.95 In Stock
Lithium Ion Polymer Battery Ideal For Feathers - 3.7V 400mAh
Lithium ion polymer (also known as 'lipo' or 'lipoly') batteries are thin, light and powerful. The output ranges from 4.2V when completely charged to 3.7V. This battery... Out of Stock
Add to Cart
Out of
Stock
© Adafruit Industries https://learn.adafruit.com/mp3-circuitpython-lars Page 5 of 32
Tactile On/Off Switch with Leads
Squeeze once to turn on, squeeze again to turn off! This clicky switch makes a great power switch or mode toggler. We like this switch because it's easy to embed in a seam for... $3.95 In Stock
Add to Cart
© Adafruit Industries https://learn.adafruit.com/mp3-circuitpython-lars Page 6 of 32
Micro B Round Panel Mount Extension Cable - 30cm
If you need to add a panel-mount connection for USB Micro B, but don't have the time or ability to cut a custom oval or square hole, this Round Panel Mount... $4.95 In Stock
20-pin 0.1" Female Header - Red - 5 pack
Female header is like the duct tape of electronics. It's great for connecting things together, soldering to perf-boards, sockets for wires or break-away header, etc. We go through... $2.50 In Stock
Add to Cart
Add to Cart
© Adafruit Industries https://learn.adafruit.com/mp3-circuitpython-lars Page 7 of 32
Break-away 0.1" 36-pin strip male header - Red - 10 pack
In this world nothing can be said to be certain, except we need headers, headers, and more headers!Each pack contains ten red 36-pin 0.1" pitch... $4.95 In Stock
Add to Cart
© Adafruit Industries https://learn.adafruit.com/mp3-circuitpython-lars Page 8 of 32
Black Nylon Screw and Stand-off Set – M2.5 Thread
Totaling 380 pieces, this M2.5 Screw Set is a must-have for your workstation. You'll have enough screws, nuts, and hex standoffs to fuel your maker... $16.95 In Stock
Plush Doll
The choice is yours, but if you want to embed creepy, semi­threatening voice samples into a murder puppet, you could do worse than a Sickening Sloth
Fuggler (https://adafru.it/LgB).
The teeth. Oh the teeth.
Who is Lars?
Lars (https://adafru.it/LgF) is the sworn enemy of CVT Joseph (https://adafru.it/Lha), the ice cream truck
godfather of Los Angeles, and owner of CVT Soft Serve (https://adafru.it/Lhb).
Lars is angry that Joe won't reveal the location of his Wonka-style Golden ice cream gift cards. This video linked below will make everything clear:
https://www.instagram.com/p/B--_P8JJWWy/ (https://adafru.it/Lhc)
Actor Matt Biedel (https://adafru.it/Lhd) (Umbrella Academy, Narcos) has kindly given us permission to use Lars's voice. At least that's what Joe claims.
Add to Cart
© Adafruit Industries https://learn.adafruit.com/mp3-circuitpython-lars Page 9 of 32
This project is not sponsored by CVT Soft Serve. John is is just really obsessed with Lars and great
ice cream.
© Adafruit Industries https://learn.adafruit.com/mp3-circuitpython-lars Page 10 of 32
Loading...
+ 22 hidden pages