How to play Wav files in esp8266
- HanhsomeTom
- Posts: 1
- Joined: Sat Apr 04, 2020 2:46 am
How to play Wav files in esp8266
need Help,please~~
Re: How to play Wav files in esp8266
Playing a wav file is going to be a bit tricky on the ESP8266 because it doesn't have a hardware DAC.
You have a few options -- external I2S DAC, etc. I've heard of people doing software sigma-delta on ESP8266 (but I imagine it doesn't sound great). But none of this has easy support from MicroPython.
I guess what I'm trying to say is, there's no easy option, but depending on how much effort you're prepared to put in you might be able to make something work -- need more information about what you were expecting. You're probably better off using a more capable microcontroller.
You have a few options -- external I2S DAC, etc. I've heard of people doing software sigma-delta on ESP8266 (but I imagine it doesn't sound great). But none of this has easy support from MicroPython.
I guess what I'm trying to say is, there's no easy option, but depending on how much effort you're prepared to put in you might be able to make something work -- need more information about what you were expecting. You're probably better off using a more capable microcontroller.
-
- Posts: 1
- Joined: Fri Feb 19, 2021 8:05 pm
Re: How to play Wav files in esp8266
Over 3 years later... I have the same question... so, using a DAC, is there an I2S (IIS) Library for 8266? I am using a Wemos D1 mini clone
-
- Posts: 1
- Joined: Mon Mar 01, 2021 7:19 pm
Re: How to play Wav files in esp8266
Did you find any? I'd like to get an I2S microphone into either my 8266 or ESP32. They both have I2S capability, but I can't seem to find a way to get this little SPH0645 mic to connect in MicroPython. For that matter, I've also got a MAX98357 I2S amplifier, but can't find resources for it either. Any help is much appreciated
- Mike Teachman
- Posts: 155
- Joined: Mon Jun 13, 2016 3:19 pm
- Location: Victoria, BC, Canada
Re: How to play Wav files in esp8266
If you are comfortable making your own custom build one option is integrating this PR for the ESP32:
https://github.com/micropython/micropython/pull/4471
Documentation for the PR is here:
https://github.com/miketeachman/micropy ... s-examples
Included in the documentation are pre-built uPy ESP32 binaries that include the I2S functionality.
https://github.com/miketeachman/micropy ... r/firmware
That might be a place to start? Note that this I2S PR was updated a few days ago to use the ESP32 cmake build.
https://github.com/micropython/micropython/pull/4471
Documentation for the PR is here:
https://github.com/miketeachman/micropy ... s-examples
Included in the documentation are pre-built uPy ESP32 binaries that include the I2S functionality.
https://github.com/miketeachman/micropy ... r/firmware
That might be a place to start? Note that this I2S PR was updated a few days ago to use the ESP32 cmake build.
Re: How to play Wav files in esp8266
is this video relevant?
- Mike Teachman
- Posts: 155
- Joined: Mon Jun 13, 2016 3:19 pm
- Location: Victoria, BC, Canada