From 0ae92c78e5a543471f1f6afd718d0acec0aa55d2 Mon Sep 17 00:00:00 2001 From: "andre.malo" Date: Thu, 25 May 2023 13:40:44 +0200 Subject: [PATCH] haut parleur radioweb --- platformio.ini | 2 +- src/main.cpp | 70 +++++++++++++++++++++++++------------------------- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/platformio.ini b/platformio.ini index c061104..fb5ceeb 100644 --- a/platformio.ini +++ b/platformio.ini @@ -12,5 +12,5 @@ platform = espressif32 board = esp32-devkitlipo framework = arduino -monitor_speed = 9600 +monitor_speed = 115200 lib_deps = esphome/ESP32-audioI2S@^2.0.7 diff --git a/src/main.cpp b/src/main.cpp index c378f1d..8a4f17f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,12 +1,12 @@ /* - Simple Internet Radio Demo - esp32-i2s-simple-radio.ino - Simple ESP32 I2S radio - Uses MAX98357 I2S Amplifier Module - Uses ESP32-audioI2S Library - https://github.com/schreibfaul1/ESP32-audioI2S +Simple Internet Radio Demo +esp32-i2s-simple-radio.ino +Simple ESP32 I2S radio +Uses MAX98357 I2S Amplifier Module +Uses ESP32-audioI2S Library - https://github.com/schreibfaul1/ESP32-audioI2S - DroneBot Workshop 2022 - https://dronebotworkshop.com +DroneBot Workshop 2022 +https://dronebotworkshop.com */ // Include required libraries @@ -29,42 +29,42 @@ String password = "lewifidecohabit"; void setup() { - // Start Serial Monitor - Serial.begin(115200); +// Start Serial Monitor +Serial.begin(115200); - // Setup WiFi in Station mode - WiFi.disconnect(); - WiFi.mode(WIFI_STA); - WiFi.begin(ssid.c_str(), password.c_str()); +// Setup WiFi in Station mode +WiFi.disconnect(); +WiFi.mode(WIFI_STA); +WiFi.begin(ssid.c_str(), password.c_str()); - while (WiFi.status() != WL_CONNECTED) - { - delay(500); - Serial.print("."); - } +while (WiFi.status() != WL_CONNECTED) +{ +delay(500); +Serial.print("."); +} - // WiFi Connected, print IP to serial monitor - Serial.println(""); - Serial.println("WiFi connected"); - Serial.println("IP address: "); - Serial.println(WiFi.localIP()); - Serial.println(""); - Serial.print("coucou"); +// WiFi Connected, print IP to serial monitor +Serial.println(""); +Serial.println("WiFi connected"); +Serial.println("IP address: "); +Serial.println(WiFi.localIP()); +Serial.println(""); +Serial.print("connected"); - // Connect MAX98357 I2S Amplifier Module - audio.setPinout(I2S_BCLK, I2S_LRC, I2S_DOUT); - Serial.print("coucou"); +// Connect MAX98357 I2S Amplifier Module +audio.setPinout(I2S_BCLK, I2S_LRC, I2S_DOUT); +Serial.print("coucou"); - // Set thevolume (0-100) - audio.setVolume(50); - Serial.print("coucou"); - audio.connecttohost("https://s4-webradio.antenne.de/antenne"); +// Set thevolume (0-100) +audio.setVolume(100); +Serial.println("toto"); +audio.connecttohost("http://194.97.151.146/antenne"); +Serial.println("connexion antenne"); } void loop() { - // Run audio player - Serial.print("coucou"); - audio.loop(); +//Run audio player +audio.loop(); } \ No newline at end of file