Looking at the 3-pin header on the board:
| Pin | Label | Function | | :--- | :--- | :--- | | 1 | SIG | Digital Output (HIGH when touched, LOW when idle) | | 2 | VCC | Power Supply (3.3V or 5V) | | 3 | GND | Ground |
Important Note: Some clone boards swap the order. Always check the silkscreen. If you wire 5V to SIG, you will destroy your microcontroller. hw-044 datasheet
(Note: On some generic versions, DT and CLK might be labeled as "B" and "A". If your rotation direction is inverted in your code, simply swap these two pins in the wiring or software).
#include <WiFi.h> #include <Audio.h>// I2S pins #define I2S_BCLK 26 #define I2S_LRC 25 #define I2S_DIN 22 Looking at the 3-pin header on the board:
Audio audio;
void setup() Serial.begin(115200); WiFi.begin("SSID", "PASSWORD"); while (WiFi.status() != WL_CONNECTED) delay(1000); Important Note: Some clone boards swap the order
audio.setPinout(I2S_BCLK, I2S_LRC, I2S_DIN); audio.setVolume(21); // 0-21 audio.connecttohost("http://example.com/stream.mp3");
void loop() audio.loop();