ESP8266Audio
ESP8266Audio copied to clipboard
Added possibility to change DOUT pin.
Use AudioOutputI2S::DOUT = 27;
before creating any instance of AudioOutputI2S
.
If you use I2C as well, do not forget to add pull-up resistors on SDA and SCL lines to avoid any problem ;)
Is there any reason why LRCLK and BCLK pins can't be changed as well? I think other pins on the ESP32 are capable and not all breakouts (like the HUZZAH32) provide access to the pins that are hard coded in the library - to me it makes more sense in usage if the pins can be optionally changed when the class is initialised, something like:
AudioOutputI2S *out;
void setup() {
out = new AudioOutputI2S(15, 14, 32); // lrclk, bclk, dout
}
I don't know lots about the ESP32 or I2S but I could have a stab at making this change - I am very busy at the moment so I couldn't do it immediately
You can change it fairly easily right after creating the "out" instance: out -> SetPinout(15, 14, 32);
Now it would be using those pins I believe.
You can change it fairly easily right after creating the "out" instance: out -> SetPinout(15, 14, 32);
Now it would be using those pins I believe.
I don't understand the purpose of the pull request in that case??
Yeah, I guess it's not really needed as long as that works. I can test it later and let you know unless someone else wants to try it.
I tried it already
out -> SetPinout()
Works fine
Edit: just a thought but maybe a documentation PR would be helpful?