The goal of this code is simple. Expose the values of a rotary encoder via MQTT so that Home Assistant can respond to it. Part of little project to learn OnShape. Design can be found on Printables Design.
- Publish rotary values to HA compatible MQTT topic
- Publish button presses to HA compatible MQTT topic
- Easy Wifi & MQTT configuration on first boot (via ESP32 AP mode)
- Deep sleep mode for energy saving on battery power
- Throttle rotary pushes to max 1 p/s
- WebSerial interface for debugging remote
- Reset configuration when rotary encoder pressed + reset button
Just open using Platform.io and upload to ESP32-C3.