esp32:ttgo_taudio_v1.6_esp32-wrover
This is an old revision of the document!
TTGO TAudio V1.6 ESP32-WROVER esp32 audio i2s
https://github.com/LilyGO/TTGO-TAudio
veikiantis grojimo kodas:
This is preformatted code all spaces are preserved: like <-this
/* TTGO T-Audio I2C pins */
#define I2C_SDA 19
#define I2C_SCL 18
/* TTGO T-Audio pins */
#define I2S_BCK 33
#define I2S_WS 25
#define I2S_DOUT 26
#define I2S_DIN 27
#include <Wire.h>
#include <WM8978.h> /* https://github.com/CelliesProjects/wm8978-esp32 */
#include <Audio.h> /* https://github.com/schreibfaul1/ESP32-audioI2S */
/* M5Stack WM8978 MCLK gpio number */
#define I2S_MCLKPIN 0
WM8978 dac;
Audio audio;
void setup() {
ESP_LOGI(TAG, "aaa");
if (!Wire.begin(21, 22, 400000))
ESP_LOGE(TAG, "i2c setup error!");
if (!dac.begin())
ESP_LOGE(TAG, "WM8978 setup error!");
dac.setSPKvol(63); /* max 63 */
dac.setHPvol(32, 32);
WiFi.begin("aistiss", "77777777");
while (!WiFi.isConnected()) {
delay(10);
}
/* set i2s pins */
audio.setPinout(I2S_BCK, I2S_WS, I2S_DOUT);
/* Start MCLK */
audio.i2s_mclk_pin_select(I2S_MCLKPIN);
ESP_LOGI(TAG, "Connected. Starting MP3...");
audio.connecttohost("http://icecast.omroep.nl/3fm-bb-mp3");
//audio.connecttohost("https://file-examples-com.github.io/uploads/2017/11/file_example_MP3_700KB.mp3");
}
void loop() {
audio.loop();
}
esp32/ttgo_taudio_v1.6_esp32-wrover.1624613345.txt.gz · Last modified: by aistis

