add tui and persistent targets

This commit is contained in:
2026-07-05 14:11:57 +02:00
parent 2e11b41855
commit f8f5167af5
11 changed files with 960 additions and 63 deletions

View File

@@ -52,20 +52,31 @@ ls -la /dev/serial/by-id/
### Serial port permissions (Linux)
| Distribution | Group for serial access |
|--------------|-------------------------|
| Debian, Ubuntu, Raspberry Pi OS | `dialout` |
| Arch Linux, CachyOS | `uucp` |
**Recommended — udev rules (one-time, works in Cursor without re-login):**
```bash
# Debian / Ubuntu / Pi
sudo usermod -aG dialout $USER
sudo ./scripts/install-udev-rules.sh
# unplug and replug the Arduino
```
This installs PlatformIOs `99-platformio-udev.rules` (covers CH340 clone Nanos and other common adapters).
**Alternative — group membership:**
```bash
# Arch / CachyOS
sudo usermod -aG uucp $USER
```
Log out and back in after adding your user to the group.
You must **fully log out of the desktop** (not just reboot or open a new terminal) so `id` shows the new group. Cursors terminal often keeps the old group list until you restart Cursor after logging out.
**Immediate workaround** (no sudo, current terminal only):
```bash
sg uucp -c "$HOME/.platformio/penv/bin/pio run -t upload"
```
Verify access: `test -w /dev/ttyUSB0 && echo ok`
## First run
@@ -86,6 +97,31 @@ Log out and back in after adding your user to the group.
Send `help` over serial for all commands (`target`, `fan on/off`, `log on/off`, `status`, `pid`, etc.).
## Raspberry Pi logging
## Raspberry Pi control
Optional CSV capture over USB is documented in [pi-instructions.md](pi-instructions.md).
On the Pi, use the curses TUI to set targets and monitor the chamber (SSH with a TTY: `ssh -t`):
```bash
python3 scripts/capture_csv.py tui
```
Keys: `0` idle · `t` target · `p` material presets · `f`/`F` fan · `l` CSV log · `a` autotune · `:` command · `q` quit
Headless CSV-only logging (e.g. systemd) is documented in [pi-instructions.md](pi-instructions.md).
## Filament drying table
| Filament | Dryer temperature | Drying time (hours) |
|----------|-------------------|---------------------|
| PLA | 5055 °C (122131 °F) | > 6 |
| ABS | 6065 °C (140149 °F) | > 6 |
| PETG | 6065 °C (140149 °F) | > 6 |
| Nylon | 7075 °C (158167 °F) | > 24 |
| Desiccants | 6065 °C (149 °F) | > 12 |
| PVA | 4045 °C (104113 °F) | > 24 |
| TPU/TPE | 5055 °C (122131 °F) | > 8 |
| ASA | 6065 °C (140149 °F) | > 8 |
| PP | 5055 °C (122131 °F) | > 6 |
| HIPS | 6065 °C (140149 °F) | > 8 |
| PC | 7075 °C (158167 °F) | > 12 |
| PEEK | 120125 °C (248257 °F) | > 24 |