53 lines
1.3 KiB
Markdown
53 lines
1.3 KiB
Markdown
# piNail ESP32-C3 (Single-Nail)
|
|
|
|
ESP32-C3 firmware for a single-nail piNail controller.
|
|
|
|
## What changed vs piNail2
|
|
- Single physical nail hardware (nail2 UI/API is mirrored for compatibility).
|
|
- Wi-Fi onboarding uses captive portal (`piNail-Setup` / `pinailsetup`).
|
|
|
|
## Hardware target
|
|
- Board: ESP32-C3 DevKitM-1 class board.
|
|
- Thermocouple ADC: MAX6675 (SPI-like bitbang).
|
|
- Relay output: active HIGH relay module.
|
|
|
|
## GPIO mapping
|
|
- 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 the piNail2-style dashboard UI (embedded static assets).
|
|
|
|
Not implemented in this firmware:
|
|
- True independent dual-zone control (nail2 is API/UI-compatible mirror of nail1).
|
|
|
|
## Build and flash
|
|
```bash
|
|
pio run -t upload --upload-port /dev/ttyACM0
|
|
pio device monitor -b 115200 --port /dev/ttyACM0
|
|
```
|