Skip to content

askrejans/G86-ESP-DSP

Repository files navigation

G86 ESP32 MQTT Display System

Multi-topic MQTT gauge display with web configuration portal and OTA updates.

Hardware Requirements

  • ESP32 development board
  • ST7789 TFT Display (240x280 pixels)
  • SPI connections as defined in platformio.ini

Pin Configuration

TFT_MISO  = 19
TFT_MOSI  = 23
TFT_SCLK  = 18
TFT_CS    = 15
TFT_DC    = 2
TFT_RST   = 4
TFT_BL    = 21 (backlight)

First Time Setup

  1. Flash firmware to ESP32
  2. Connect to WiFi: Device creates AP G86-Display-AP (password: golf1986)
  3. Configure WiFi: Captive portal opens automatically
  4. Set MQTT server: Enter broker address and port
  5. Access web interface: Navigate to device IP address

Web Interface

Dashboard (http://<device-ip>/)

  • Real-time value display
  • WiFi/MQTT connection status
  • IP address information
  • Quick access to configuration and OTA

Configuration (http://<device-ip>/config)

  • 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)

OTA Updates (http://<device-ip>/update)

  • Drag-and-drop firmware upload
  • Built-in with AsyncElegantOTA

API Endpoints

GET /api/status

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
  }
}

GET /api/config

Returns full configuration (JSON export)

POST /api/config

Import configuration (JSON body)

GET /api/topics

List all configured topics

POST /api/topic

Add new topic:

{
  "topic": "/GOLF86/ECU/RPM",
  "displayName": "Engine RPM",
  "gauge": {
    "minValue": 0,
    "maxValue": 7500,
    "units": " RPM",
    "colorScheme": 4
  }
}

DELETE /api/topic?index=0

Remove topic by index

POST /api/active-topic?index=0

Set active topic

POST /api/restart

Restart device

Gauge Color Schemes

  • 0: RED2RED (solid red)
  • 1: GREEN2GREEN (solid green)
  • 2: BLUE2BLUE (solid blue)
  • 3: BLUE2RED (full spectrum)
  • 4: GREEN2RED (high temperature style) ⭐ Default
  • 5: RED2GREEN (low battery style)

Default Configuration

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

Building & Uploading

PlatformIO CLI

pio run -t upload
pio device monitor

PlatformIO IDE

  1. Open project in VS Code
  2. Click "Upload" in PlatformIO toolbar
  3. Open Serial Monitor for debug output

Architecture

FreeRTOS Tasks

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

License

Published under MIT licence. Copyright © 2025 Arvis Skrējāns

About

ESP32 based display for displaying car data over MQTT. Part of G86 project.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages