Skip to main content

Dozuki Update 8/24

Minor Versionm

by Alan

Introduction

This tutorial will guide you through setting up the MAX98357 using I2S, a digital sound protocol. Here's a link to a short video explaining the I2S breakout board

YouTube

  1. Before you complete this tutorial, make sure that you have completed the Feather M4 Express tutorial first.
    • Before you complete this tutorial, make sure that you have completed the Feather M4 Express tutorial first.

    • Make sure that you're viewing this tutorial in Operator View! You must use Operator View to earn credit for this tutorial. Hit the button in the top right of your screen.

    • Make sure you have the Micro SD Card Breakout Board tutorial completed

  2. Adafruit has provided a thorough explanation on how to set up the board. For more details, please visit this link. In this summary, I will highlight the important aspects.
    • Adafruit has provided a thorough explanation on how to set up the board. For more details, please visit this link. In this summary, I will highlight the important aspects.

    • Connect the pins: VIN to 3V on the Feather, GND to GND, DIN to D11 on the Feather, BCLK to TX, and lastly, LRC to D10 on the Feather.

    • For the SD card, Connect the 3V of the breakout board to the 3.3V of the feather, GND to the GND of the feather, CLK to SCK, DO/SO to MI, DI/SI to MO, and CS to any digital pin

    • To learn more about I2S visit this link

  3. Upload this code from Adafruitunder Tone Generation
    • Upload this code from Adafruitunder Tone Generation

    • It will play a tone at a frequency of 440. You can change this to whatever frequency you'd like, as long as it is under 2200Hz. If you exceed that threshold, you might hear some distortion.

    • The code on Adafruit's website below Wave File plays any WAV file stored on your Feather M4. It's not ideal because the Feather can only store up to 2MB of data. In the next step, I will show you how to store it on the SD card and play it from there.

  4. Run the example code that can be found on GitHub.
    • Run the example code that can be found on GitHub.

    • Download the WAV file and save it to the SD card using your kit's included SD card reader. Here's a link to download royalty-free WAV files.

    • Here is the download link for the one I used in the code

    • To use your own wav file, modify wave_file = open("add your file name", "rb") for it to function properly.

    • With what you learned, Upload a different WAV file and have it play on the speaker.

    • In your kit, you have a button and a resistor, create a Play/Pause control. The first press will play the music, and the second press will pause it.

    • It should look something like this in the video

Finish Line

Davidson Theosmy

Member since: 05/15/2024

6 Guides authored

Team

Maker-E Techs Member of Maker-E Techs

7 Members

49 Guides authored

0 Comments

Add Comment

View Statistics:

Past 24 Hours: 1

Past 7 Days: 2

Past 30 Days: 12

All Time: 49