Skip to content
- WebSocket Client: Connects to a secure WebSocket server (
wss://
) for bidirectional, real-time communication.
- Dynamic Command Handling: Parses JSON commands to control LEDs, read analog sensors, and manage a servo motor.
- Persistent Wi-Fi Credentials: Saves Wi-Fi SSID and password to the ESP32’s flash memory using the
Preferences
library.
- Access Point (AP) Mode: Switches to a default Access Point (
UnderDeck
) if no saved Wi-Fi credentials are found or the connection fails.
- Dynamic MAC Address Integration: Obtains the ESP32’s unique MAC address and appends it to the WebSocket URL for device identification.
- Sensor Monitor: Enables or disables continuous monitoring of button, potentiometer, and touch sensors via WebSocket commands.
- Activity Indicator: Blinks the built-in LED on the ESP32 to provide visual feedback whenever a command is received.
- Debug Mode: A configurable debug mode can be enabled or disabled to toggle detailed serial logging. This setting is saved to flash memory.
- Serial Control: All commands can also be sent via the USB serial connection for easy testing and debugging.