Is it possible to make the M5 work as a MP3 player?
I mean read from a MP3 file on SD card and output via the speaker?
My son have a project via school and he wants to build a robot that asks 'how was your day'.
I thought about putting it as a mp3 (or any audio file) and play back when some one moves close enough (using Ultra sound distance meter) adding some servos to move the head and eyebrows. adding some neopixels as eyes as well
MP3 doesnt seem supported by the M5Stack library, however the Speaker class has 8bit PCM support:
void playMusic(const uint8_t* music_data, uint16_t sample_rate);
Still you would have to bind it to the SDcard files, by now the audio is defined in startup_music.c as:
const unsigned char m5stack_startup_music
Also, this could help you:
@DoNcK Thansk I will look in to this.
Another one wich looks even more promising :