Uses the I2S module to synthesize tones using a minimal amount of Flash memory, RAM and CPU time.
Audio is output via the I2S_TX_DATA pin using Delta-Sigma modulation. This is a high-frequency bitstream which requires low-pass filtering and suitable amplification for driving speaker/headphones.
Do not connect the output directly to a loudspeaker or headphone as you may damage the GPIO. Always buffer the signal using a transistor, op-amp, etc.
See Esp8266 Drivers for further information about I2S.
As the output pin is normally used as UART0 RX, the alternate UART pin configuration is used:
|Debug serial input
|Debug serial output
GPIO3 is still required for programming so you’ll need to make sure the audio buffer is disconnected, or has a reasonably high impedance load. You’ll also need an additional USB-serial converter connected to GPIO13 & 15 for terminal operation.