Port piNail2 web UI and API parity to ESP32-C3 with one-side pin mapping

This commit is contained in:
2026-03-13 23:21:34 +00:00
parent fc4c4a88f7
commit acce74e2ad
4 changed files with 3098 additions and 294 deletions
+7 -7
View File
@@ -9,16 +9,16 @@
- Relay: SSR/mechanical relay, active HIGH.
## GPIO
- `GPIO2`: relay output
- `GPIO4`: MAX6675 SCK
- `GPIO5`: MAX6675 CS
- `GPIO6`: MAX6675 SO
- `D10`: relay output
- `D9`: MAX6675 SCK
- `D8`: MAX6675 CS
- `D7`: MAX6675 SO
## Safety defaults
- Max temp cutoff: `800F`
- Idle shutoff: `30 min`
- Near setpoint band for idle: `+/-8F`
## Fixed control timing
- PWM/control loop window: `1800ms`
- Control tick: `200ms`
## Control timing
- Adjustable via API/UI (`loop_size_ms` and `sleep_time`)
- Default profile is responsive (`1800ms` loop window, `0.2s` tick)
+18 -11
View File
@@ -3,9 +3,7 @@
ESP32-C3 firmware for a single-nail piNail controller.
## What changed vs piNail2
- Single nail only.
- Loop timing is fixed for responsiveness (`1800ms` cycle, `200ms` tick).
- Loop timing controls are intentionally not exposed in API/UI.
- Single physical nail hardware (nail2 UI/API is mirrored for compatibility).
- Wi-Fi onboarding uses captive portal (`piNail-Setup` / `pinailsetup`).
## Hardware target
@@ -14,29 +12,38 @@ ESP32-C3 firmware for a single-nail piNail controller.
- Relay output: active HIGH relay module.
## GPIO mapping
- Relay: `GPIO2`
- MAX6675 SCK: `GPIO4`
- MAX6675 CS: `GPIO5`
- MAX6675 SO: `GPIO6`
- Relay: `D10`
- MAX6675 SCK: `D9`
- MAX6675 CS: `D8`
- MAX6675 SO: `D7`
## API compatibility
Implemented endpoints:
- `GET /api/status`
- `GET /api/status/all`
- `GET /api/history`
- `POST /api/power`
- `POST /api/setpoint`
- `POST /api/control`
- `POST /api/flight`
- `POST /api/scheduler`
- `POST /api/pid`
- `POST /api/pid/reset`
- `POST /api/safety/reset`
- `GET /api/heartbeat`
- `GET /api/autotune`
- `POST /api/autotune/start`
- `POST /api/autotune/stop`
- `GET/POST /api/presets`
- `POST /api/preset/<name>`
- `DELETE /api/preset/<name>`
- `GET /api/config`
Built-in web interface:
- `GET /` serves a lightweight control UI for power, setpoint, PID, and safety reset.
- `GET /` serves the piNail2-style dashboard UI (embedded static assets).
Not implemented in this firmware:
- Scheduler and dual-nail routing.
- Autotune endpoints.
- Loop timing reconfiguration endpoint.
- True independent dual-zone control (nail2 is API/UI-compatible mirror of nail1).
## Build and flash
```bash
+1019 -267
View File
File diff suppressed because it is too large Load Diff
+2045
View File
File diff suppressed because it is too large Load Diff