dashboard: add esp32-s3 bringup sketch
This commit is contained in:
@@ -1,81 +1,29 @@
|
|||||||
# ESP32-S3 Dashboard Firmware
|
# ESP32-S3 Dashboard Firmware
|
||||||
|
|
||||||
This is the placeholder for the current dashboard firmware direction.
|
Target Hardware:
|
||||||
|
|
||||||
## Target hardware
|
- Waveshare ESP32-S3 Touch LCD 5B
|
||||||
|
- 1024x600 display
|
||||||
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
|
|
||||||
- Capacitive touch
|
- Capacitive touch
|
||||||
- ESP32-S3 platform
|
- ESP32-S3
|
||||||
- Native WiFi
|
- 16MB Flash
|
||||||
- Integrated CAN transceiver available for future vehicle integration
|
- 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.
|
Cargo ESP API Base:
|
||||||
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.
|
|
||||||
|
|
||||||
Do not start with CAN, OBD-II, tilt sensors, or vehicle wiring.
|
/api/v1
|
||||||
|
|||||||
@@ -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 <WiFi.h>
|
||||||
|
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user