This project is for controlling Volumio by simple control buttons on ESP32 module.
This project offers to control:
- Toggle (Play/Pause)
- Volume Up/Down
- Random Album Play (based on Randomizer plugin)
- NodeMCU ESP32 (ESP32-DevkitC)
ESP32 Pin | GPIO Function | Assignment |
---|---|---|
GPIO2 | OUTPUT | Blue LED |
GPIO17 | INPUT/PULLUP | Center Button |
GPIO18 | INPUT/PULLUP | Down Button |
GPIO19 | INPUT/PULLUP | Up Button |
Arduino -> 'Tools' -> 'Manage Libraries...' -> Install 'WiFiManager' Version 2.0.3-alpha or later
Arduino -> 'Tools' -> 'Manage Libraries...' -> Install 'ArduinoJson' Version 6.18.3 or later
Download arduinoWebSockets-2.3.4.zip
Arduino -> 'Sketch' -> 'Include Library' -> Add .ZIP Library -> Select 'arduinoWebSockets-2.3.4.zip' downloaded above.
Note that arduinoWebSockets-2.3.5 causes build error.
If Volumio hostname is other than 'volumio', revise following line in VolumioSimpleControlButtons.ino.
const char *VolumioHost = "volumio"; // Change here
Arduino -> 'Tools' -> 'Board' -> 'ESP32 Arduino' -> 'ESP32 Dev Module'
Arduino -> 'Sketch' -> 'Upload'
- Connect SSID 'OnDemandAP' when ESP32 power on at first time to set up WiFi connection.
See detail at WiFiManger. - Reset SSID configuration when ESP32 Reset button released with pushing Center button, Up button and Down button.
- Center button single click to toggle (play/pause)
- Center button 3 times click to random album play
- Up button single/continuous click to increase volume
- Down button single/continuous click to decrease volume