From 64d26a32602c01d0592734185a5c1eed3f714bc3 Mon Sep 17 00:00:00 2001 From: nick Date: Tue, 9 Jun 2026 20:45:17 -0600 Subject: [PATCH] dashboard: add esp32-s3 bringup sketch --- firmware/esp32-s3-dashboard/README.md | 90 ++++--------------- .../esp32-s3-dashboard/dashboard_bringup.ino | 58 ++++++++++++ 2 files changed, 77 insertions(+), 71 deletions(-) create mode 100644 firmware/esp32-s3-dashboard/dashboard_bringup.ino diff --git a/firmware/esp32-s3-dashboard/README.md b/firmware/esp32-s3-dashboard/README.md index a175979..73c60de 100644 --- a/firmware/esp32-s3-dashboard/README.md +++ b/firmware/esp32-s3-dashboard/README.md @@ -1,81 +1,29 @@ # ESP32-S3 Dashboard Firmware -This is the placeholder for the current dashboard firmware direction. +Target Hardware: -## Target hardware - -Current dashboard target: - -- Waveshare ESP32-S3 touchscreen display -- WiFi connection to the Cargo ESP32 access point -- HTTP/REST communication with the Cargo ESP32 API -- Future LVGL-based dashboard UI - -## Responsibilities - -The ESP32-S3 dashboard is responsible for: - -- Touchscreen UI -- Vehicle gauges -- Dashboard rendering -- Future CAN/OBD-II vehicle visualization -- Future tilt/roll/off-road screen visualization - -## Not responsible for - -The ESP32-S3 dashboard does not own: - -- Relay authority -- BMS authority -- Alarm authority -- Cargo ESP configuration storage -- Load-switching hardware control as the source of truth - -The Cargo ESP32 remains the power-system controller and source of truth. - -## v1 communication path - - Dashboard ESP32-S3 - <-> WiFi / HTTP REST - Cargo ESP32 AP - -Not v1 dashboard communication: - -- Pico UART -- ESP-NOW -- MQTT -- CAN between controllers - -## Selected Hardware - -The selected dashboard hardware target is: - - Waveshare ESP32-S3 Touch LCD 5B - -Display details: - -- 5-inch touchscreen -- 1024x600 resolution +- Waveshare ESP32-S3 Touch LCD 5B +- 1024x600 display - Capacitive touch -- ESP32-S3 platform -- Native WiFi -- Integrated CAN transceiver available for future vehicle integration +- ESP32-S3 +- 16MB Flash +- 8MB PSRAM -This is the current active dashboard target. The archived Pico dashboard is not active firmware. +Current Status: -## Bring-Up Plan +- Basic dashboard bring-up sketch created -Initial Waveshare ESP32-S3 Touch LCD 5B work should start with standalone bench testing. +Upcoming milestones: -Bring-up order: +1. Serial bring-up +2. Display bring-up +3. Touch validation +4. WiFi connection +5. Cargo ESP API integration +6. LVGL dashboard +7. CAN integration +8. Vehicle telemetry -1. Confirm USB/serial detection. -2. Flash a known-good Waveshare demo. -3. Confirm 1024x600 display output. -4. Confirm capacitive touch input. -5. Build a minimal project dashboard boot screen. -6. Connect to Cargo ESP WiFi AP. -7. Read `/api/v1/status` and `/api/v1/config`. -8. Render outputs dynamically from the Cargo ESP API. +Cargo ESP API Base: -Do not start with CAN, OBD-II, tilt sensors, or vehicle wiring. + /api/v1 diff --git a/firmware/esp32-s3-dashboard/dashboard_bringup.ino b/firmware/esp32-s3-dashboard/dashboard_bringup.ino new file mode 100644 index 0000000..848fe69 --- /dev/null +++ b/firmware/esp32-s3-dashboard/dashboard_bringup.ino @@ -0,0 +1,58 @@ +/* + Overland Controller + ESP32-S3 Dashboard Bring-Up + + Target: + Waveshare ESP32-S3 Touch LCD 5B + 1024x600 + + Purpose: + Verify build environment and establish + the first dashboard firmware entry point. + + Future: + LVGL + Cargo ESP API integration + CAN + OBD-II +*/ + +#include + +const char* DASHBOARD_VERSION = "0.0.1-bringup"; + +unsigned long lastPrint = 0; + +void setup() { + Serial.begin(115200); + delay(1000); + + Serial.println(); + Serial.println("================================"); + Serial.println("Overland Controller Dashboard"); + Serial.println("================================"); + Serial.print("Version: "); + Serial.println(DASHBOARD_VERSION); + Serial.println("Target: Waveshare ESP32-S3 Touch LCD 5B"); + Serial.println("Display: 1024x600"); + Serial.println("API Base: /api/v1"); + Serial.println(); +} + +void loop() { + if (millis() - lastPrint > 5000) { + lastPrint = millis(); + + Serial.println("--- Dashboard Heartbeat ---"); + + if (WiFi.status() == WL_CONNECTED) { + Serial.print("WiFi Connected: "); + Serial.println(WiFi.localIP()); + } else { + Serial.println("WiFi Not Connected"); + } + + Serial.println("Cargo API: /api/v1"); + Serial.println(); + } +}