Multi-topic MQTT gauge display with web configuration portal and OTA updates.
- ESP32 development board
- ST7789 TFT Display (240x280 pixels)
- SPI connections as defined in
platformio.ini
TFT_MISO = 19
TFT_MOSI = 23
TFT_SCLK = 18
TFT_CS = 15
TFT_DC = 2
TFT_RST = 4
TFT_BL = 21 (backlight)
- Flash firmware to ESP32
- Connect to WiFi: Device creates AP
G86-Display-AP(password:golf1986) - Configure WiFi: Captive portal opens automatically
- Set MQTT server: Enter broker address and port
- Access web interface: Navigate to device IP address
- Real-time value display
- WiFi/MQTT connection status
- IP address information
- Quick access to configuration and OTA
- MQTT Settings: Server, port, username, password, client name
- Topics: Add/remove/edit subscriptions with gauge settings
- Display Settings: Brightness (0-255), refresh rate (16-1000ms)
- Drag-and-drop firmware upload
- Built-in with AsyncElegantOTA
Returns current system status:
{
"wifi": true,
"mqtt": true,
"ip": "192.168.1.100",
"uptime": 3600,
"activeTopic": {
"displayName": "Engine RPM",
"value": 4500.0,
"units": " RPM",
"lastUpdate": 123456789
}
}Returns full configuration (JSON export)
Import configuration (JSON body)
List all configured topics
Add new topic:
{
"topic": "/GOLF86/ECU/RPM",
"displayName": "Engine RPM",
"gauge": {
"minValue": 0,
"maxValue": 7500,
"units": " RPM",
"colorScheme": 4
}
}Remove topic by index
Set active topic
Restart device
0: RED2RED (solid red)1: GREEN2GREEN (solid green)2: BLUE2BLUE (solid blue)3: BLUE2RED (full spectrum)4: GREEN2RED (high temperature style) ⭐ Default5: RED2GREEN (low battery style)
On first boot, system creates default configuration:
MQTT Server: localhost:1883
Username: public
Password: public
Default Topic: /GOLF86/ECU/RPM
- Display Name: Engine RPM
- Range: 0 - 7500
- Units: RPM
- Color: GREEN2RED
pio run -t upload
pio device monitor- Open project in VS Code
- Click "Upload" in PlatformIO toolbar
- Open Serial Monitor for debug output
Network Task (Core 0)
- WiFi management and reconnection
- MQTT connection and message handling
- Web server operation
- State machine updates
- Auto-topic switching
Display Task (Core 1)
- High-speed TFT rendering (30-60 FPS)
- Partial gauge updates
- Connection status display
- Frame pacing
Published under MIT licence. Copyright © 2025 Arvis Skrējāns