diff --git a/Mozart-Lacrimosa.mp3 b/Mozart-Lacrimosa.mp3 deleted file mode 100644 index a5c707e..0000000 Binary files a/Mozart-Lacrimosa.mp3 and /dev/null differ diff --git a/platformio.ini b/platformio.ini index fb5ceeb..8841d3e 100644 --- a/platformio.ini +++ b/platformio.ini @@ -13,4 +13,3 @@ platform = espressif32 board = esp32-devkitlipo framework = arduino monitor_speed = 115200 -lib_deps = esphome/ESP32-audioI2S@^2.0.7 diff --git a/src/main.cpp b/src/main.cpp index 8a4f17f..a2b75ad 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -21,6 +21,10 @@ https://dronebotworkshop.com // Create audio object Audio audio; +const int potPin = 33; +float potvalue=0.00; +float volume; + // Wifi Credentials String ssid = "cohabit"; @@ -66,5 +70,10 @@ void loop() { //Run audio player +potvalue=analogRead(potPin); +volume = potvalue / 40.95; +int(volume); +//Serial.println("%d",volume); +audio.setVolume(volume); audio.loop(); } \ No newline at end of file