Has anyone had luck interfacing a max98375 to esp8266-12? I’ve tried a lot of pin configurations but no luck. Is there something that works besides an SD or mp3 player?
Hi.
Unfortuantely, I never experimented with that module.
What does your wiring look like?
Regards,
Sara
Din = 3 or D1 GPIO5
LRC = 18 = D5 GPIO0
BLCK = 17 = D4 GPIO2
DIN = GPIIO5
LRC =- GPIO2
BLCK = GPIO15
/* Chat GPT */
#include <Arduino.h>
#include <AudioFileSourceSPIFFS.h>
#include <AudioGeneratorMP3.h>
#include <AudioOutputI2S.h>
AudioGeneratorMP3 *mp3;
AudioFileSourceSPIFFS *file;
AudioOutputI2S *out;
void setup() {
Serial.begin(115200);
SPIFFS.begin();
file = new AudioFileSourceSPIFFS(“/test.mp3”);
out = new AudioOutputI2S();
out->SetPinout(14, 15, 2); // BCLK, LRC, DIN
mp3 = new AudioGeneratorMP3();
mp3->begin(file, out);
}
void loop() {
if (mp3->isRunning()) {
if (!mp3->loop()) {
mp3->stop();
}
} else {
Serial.println(“MP3 done playing”);
delay(1000);
}
}