Firmware for ESP32-based touchscreen display system with flow meter monitoring, WiFi connectivity, and MQTT communication for the PrecisionPour beverage dispensing system.
Copyright (c) 2026 Dynamic Devices Ltd. All rights reserved.
This software is proprietary and confidential. See LICENSE for details.
- Install PlatformIO: Install VS Code and the PlatformIO IDE extension
- Configure: Use
pio run -e esp32dev-idf -t menuconfigto configure settings - Build & Upload:
pio run -t upload - Monitor:
pio device monitor
pio run -e esp32dev-idf -t menuconfigNavigate to PrecisionPour Configuration to configure:
- Hardware pins (display, touch, flow meter)
- WiFi credentials
- MQTT server settings
- Operating mode (Production/Test)
- Debug options
WiFi and MQTT credentials can be set via:
- KConfig (highest priority)
- secrets.h (fallback) - Copy
include/secrets.h.exampletoinclude/secrets.h
- Display: ILI9341 TFT (320x240 landscape)
- Touch: XPT2046 resistive touchscreen
- Flow Meter: YF-S201 Hall Effect sensor on GPIO26
See docs/HARDWARE_SETUP.md for detailed pin configuration.
- LVGL-based UI with touch support
- Flow meter integration with real-time rate and volume tracking
- WiFi connectivity with auto-reconnect
- MQTT communication for cloud integration
- Production mode with QR code payment
- Test mode for hardware validation
The device subscribes to device-specific MQTT topics and responds to JSON commands.
See docs/MQTT_PROTOCOL.md for complete protocol documentation.
{
"id": "order_12345",
"cost_per_ml": 0.005,
"max_ml": 500,
"currency": "GBP"
}precisionpour/
├── src/ # Source files
├── include/ # Header files
│ └── config.h # Hardware configuration
├── platformio.ini # PlatformIO configuration
└── docs/ # Documentation
Enable debug tap-to-navigate via menuconfig:
DEBUG_QR_TAP_TO_POUR- Tap QR code → Pouring screenDEBUG_POURING_TAP_TO_FINISHED- Tap Pouring → Finished screenDEBUG_FINISHED_TAP_TO_QR- Tap Finished → QR code screen
- Hardware Setup - Pin configuration and hardware details
- MQTT Protocol - Communication protocol and commands