Maker.io main logo

Adding Audio to Your Embedded Project Using Qwiic Twist and Audio Player

26

2025-06-20 | By SparkFun Electronics

License: See Original Project Audio Qwiic

Courtesy of SparkFun

Guide by QCPete, Member #927272

Introduction

Looking to bring sound into your next embedded project? In this tutorial, we'll walk you through using the SparkFun Audio Player Breakout in combination with the Qwiic Twist to let you select and play tracks from a microSD card. It's a compact and powerful way to add audio interactivity to your prototype using simple I2C and serial connections.

Follow along on video here or find the full tutorial below.

 

Hardware

To follow this experiment, you will need the following materials. While this is a simple project, we wanted to make sure that you have everything you need to get started before we get to the code.

Wiring

diagram_1

Qwiic Twist connected to RedBoard Qwiic via Qwiic cable Audio Player Breakout:

  • TXO → RedBoard D8

  • RXI → RedBoard D9

  • VIN → RedBoard 5V

  • GND → RedBoard GND

Audio Out → Mono Audio Amp → Speaker Mono Audio Amp

  • PWR - → GND

  • PWR +5V

Software Setup

To follow along, install the following libraries via the Arduino Library Manager:

setup_2

Use Example4_QwiicTwist.ino from the SparkFun MY1690 MP3 Decoder Library examples. It enables the Qwiic Twist to:

  • Rotate to change track number

  • Press to play the selected track

  • Display info via serial monitor

How It Works:

  • The Audio Player Breakout receives serial messages from the RedBoard Qwiic.

  • The Qwiic Twist allows you to navigate through tracks by rotating and play one by pressing.

  • The selected audio file is played through the MY1690 and sent to the mono amp and speaker.

Serial Feedback: The sketch prints useful debug messages to the Serial Monitor, including the number of tracks on your SD card and the currently selected track.

Tips:

  • Make sure your microSD card is formatted correctly and contains MP3/WAV files.

  • Use a single-cell LiPo if you'd like to run this portable.

  • You can customize the playback behavior by editing the example sketch.

Conclusion

This setup gives you a simple and intuitive audio playback solution for embedded projects. With just a few SparkFun parts and a handful of wires, you can control sound output with a tactile, menu-like experience. It’s perfect for interactive displays, soundboards, or even DIY toys!

Let us know what you build with it!

制造商零件编号 15123
REDBOARD QWIIC ATMEGA328 EVAL BD
SparkFun Electronics
制造商零件编号 12795
JUMPER WIRE M/M 6" 20COND
SparkFun Electronics
制造商零件编号 15083
SPARKFUN QWIIC TWIST - RGB ROTAR
SparkFun Electronics
制造商零件编号 12002
BREADBOARD - SELF-ADHESIVE (WHIT
SparkFun Electronics
制造商零件编号 14456
SOLDERING IRON - 60W (ADJUSTABLE
SparkFun Electronics
制造商零件编号 00116
BREAK AWAY HEAD
SparkFun Electronics
制造商零件编号 11044
EVAL BOARD FOR TPA2005D1
SparkFun Electronics
Add all DigiKey Parts to Cart
Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.