diff --git a/README.md b/README.md index 4ede273..54060d5 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,9 @@ Implemented endpoints: - `POST /api/safety/reset` - `GET /api/heartbeat` +Built-in web interface: +- `GET /` serves a lightweight control UI for power, setpoint, PID, and safety reset. + Not implemented in this firmware: - Scheduler and dual-nail routing. - Autotune endpoints. diff --git a/src/main.cpp b/src/main.cpp index 1b62c20..1d98d08 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -297,9 +297,157 @@ void handleSafetyReset() { sendJson(out); } +const char UI_HTML[] PROGMEM = R"HTML( + + + + + + piNail ESP32-C3 + + + +
+
+

piNail ESP32-C3 (Single Nail)

+
Connecting...
+
+ +
+
+
Temperature
+
--
+
+
+
Setpoint
+
--
+
+
+
Relay
+
--
+
+
+
Output (ms/window)
+
--
+
+
+ +
+
+ + + +
+
+ + +
+
+ +
+
PID
+
+ + + + +
+
+ +
+
Safety
+
--
+
+
+
+ + + + +)HTML"; + void setupRoutes() { server.on("/", HTTP_GET, []() { - server.send(200, "text/plain", "piNail ESP32-C3 controller online"); + server.send_P(200, "text/html", UI_HTML); }); server.on("/api/status", HTTP_GET, handleStatus); server.on("/api/history", HTTP_GET, handleHistory);