This commit is contained in:
andre.malo 2023-05-30 14:29:02 +02:00
parent 0ae92c78e5
commit cfd66549ed
3 changed files with 9 additions and 1 deletions

Binary file not shown.

View file

@ -13,4 +13,3 @@ platform = espressif32
board = esp32-devkitlipo
framework = arduino
monitor_speed = 115200
lib_deps = esphome/ESP32-audioI2S@^2.0.7

View file

@ -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();
}