Makerfabs / Project_MakePython_Audio_Music

20 stars 7 forks source link

MicroPython Audio MusicPlayer

/*
Version:        V2.1
Author:         Vincent
Create Date:    2020/7/8
Update Date:    2020/9/11
Note:
    2020/9/11   V2.1:
    1,Add a bluetooth stero demo.
    2020/7/29   V2.0:
    1,The new version supports all the functions of MP3: song switching, volume adjustment, pause and mute.Support mp3, WAV, ACC common formats.
    2,3D printing shells designed for MakePython ESP32 and MakePython Audio are provided.
    3,The code was completely refacted, and the files of V1.1 were placed in the old-SRc folder. The previous README was renamed to Readme-OldVersion.
    2020/7/18   V1.1: 
    1,Move the original WavPlayer to "\Project_MakePython_Audio_Music\ ESP32_wav_player"
    2,"\Project_MakePython_Audio_Music\ ESP32_MP3" folder for Mp3 decoding instance and volume control instance.
    3,Added a brief description of the MP3 decoder and how to install the library.
    4. MicroPython Audio can be downloaded without unplugging. When uploading the program, please rotate the switch next to the 3.5mm Audio interface to the Audio socket.
*/

YOUTUBE:How to DIY an ESP32 Audio Player(3D print box)

YOUTUBE:MakePython Audio Music Play main

[toc]

OVERVIEW

Intruduce

Makerfabs home page

Makerfabs Wiki

MakePython Audio inherited the DAC chip and SD card module.The I2S chip allows you to play songs stored on an SD card .The SSD1306 screen displays basic information about the song, and the scroll wheel switch on Audio allows you to switch and pause the music.

oversee

Equipment list

STEPS

Prepare And Burn

If you have any questions,such as how to install the development board, how to download the code, how to install the library. Please refer to :Makerfabs_FAQ

Without_plug

Prepare Music

3.5mm

How to use MusicPlayer

image-20200708134131231

image-20200708134131231

Esp32-AudioI2S Lib

Introduce

UDA1334ATS on Makepython Audio does not support MP3 hardware decoding. Here is an example of MP3 decoding and volume control.Not only can you read MP3 files from your SD card, but you can also play MP3 stations directly from the Internet.

Install Library

Lib from github:schreibfaul1/ESP32-audioI2S

You can download the library folder "C:\Users\ YourName\Documents\Arduino\ Libraries" installed into the Arduino compiler.Or There is also a copy in the folder "\Project_MakePython_Audio_Music\esp32_mp3\".

Run Example

//    audio.connecttoFS(SD, "/320k_test.mp3");
      audio.connecttoFS(SD, "/MoonlightBay.mp3");//ChildhoodMemory.mp3  //MoonRiver.mp3
//    audio.connecttoFS(SD, "test.wav");
//    audio.connecttohost("http://www.wdr.de/wdrlive/media/einslive.m3u");
//    audio.connecttohost("http://macslons-irish-pub-radio.com/media.asx");
//    audio.connecttohost("http://mp3.ffh.de/radioffh/hqlivestream.aac"); //  128k aac
//    audio.connecttohost("http://mp3.ffh.de/radioffh/hqlivestream.mp3"); //  128k mp3
//    audio.connecttospeech("Wenn die Hunde schlafen, kann der Wolf gut Schafe stehlen.", "de");

3D Printer Box

We designed a simple 3D-printed case. Don't need support.

3d1

3d1

Old Files

Blue Tooth Stereo