Skip to content

Commit b4dc042

Browse files
committed
Merge branch 'main' of https://github.com/MrMatt57/pitclaw
2 parents 5a4a890 + 8d34040 commit b4dc042

6 files changed

Lines changed: 525 additions & 106 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
.vscode/launch.json
66
.vscode/ipch
77

8+
# Node.js
9+
node_modules/
10+
811
# OS
912
.DS_Store
1013
Thumbs.db
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# 012: Restructure README and Documentation
2+
3+
**Branch**: `feature/readme-docs-restructure`
4+
**Created**: 2026-02-18
5+
6+
## Summary
7+
8+
Restructure the README to focus on what new visitors need (what it is, hardware, quick start) and move developer-focused content into dedicated docs. The goal is a concise onboarding experience for people who want to build this project, with an index linking to deeper development guides.
9+
10+
## Requirements
11+
12+
- README should prominently show: what the project is, hardware requirements/BOM, and a quick getting started guide
13+
- Move wiring diagram out of README into `docs/wiring.md`, linked from the hardware section
14+
- Create `docs/firmware-development.md` covering firmware building, testing, architecture, and source layout
15+
- Create `docs/web-development.md` covering simulator usage, cook profiles, web UI development, and WebSocket protocol
16+
- README should have a "Development" section that serves as an index linking to the doc files
17+
- Keep the README hardware section (BOM, probes, 3D printed parts) intact — builders need it
18+
- Preserve all existing content; nothing should be lost, just reorganized
19+
- All internal links should work correctly
20+
21+
## Design
22+
23+
### README.md (streamlined)
24+
25+
Keep these sections in README:
26+
1. **Header** — logo, badge, one-paragraph description, screenshot
27+
2. **Features** — bullet list (as-is)
28+
3. **Hardware** — BOM table, probes, 3D printed parts. Add a link to `docs/wiring.md` for wiring details
29+
4. **Quick Start** — condensed: clone, setup script, build & flash, first boot steps, accessing web UI, factory reset, OTA mention
30+
5. **Development** — brief index paragraph linking to:
31+
- `docs/firmware-development.md` — building, testing, architecture
32+
- `docs/web-development.md` — web UI, simulator, WebSocket protocol
33+
- `docs/wiring.md` — wiring diagram and pin assignments
34+
- `enclosure/README.md` — 3D printing and assembly
35+
6. **License** — TBD
36+
37+
Remove from README (moved to docs):
38+
- Wiring diagram → `docs/wiring.md`
39+
- Simulator section → `docs/web-development.md`
40+
- Running Tests section → `docs/firmware-development.md`
41+
- Web UI detailed description → `docs/web-development.md`
42+
43+
### docs/wiring.md
44+
45+
- Carrier board wiring diagram (the ASCII art from current README)
46+
- Pin assignment table
47+
- Probe voltage divider schematic
48+
49+
### docs/firmware-development.md
50+
51+
- Prerequisites (manual install list — the non-Windows path)
52+
- Quick setup script mention
53+
- Build & flash commands (firmware targets)
54+
- Running tests (native + embedded)
55+
- OTA update details
56+
- Architecture overview: source layout tree, key modules described
57+
- Configuration persistence (config.json structure)
58+
- Error detection table
59+
- Key technical constants (Steinhart-Hart, PID defaults, fan control)
60+
61+
### docs/web-development.md
62+
63+
- Simulator setup and usage (build, run, options)
64+
- Cook profiles table
65+
- Web UI features overview
66+
- PWA details (manifest, service worker)
67+
- WebSocket protocol documentation (all message types)
68+
- Key constraint: web UI must work identically on simulator and ESP32
69+
- Editing workflow (edit files in firmware/data/, refresh browser)
70+
71+
## Files to Modify
72+
73+
| File | Change |
74+
|------|--------|
75+
| `README.md` | Restructure: keep intro/features/hardware/quick-start, add dev index, remove moved sections |
76+
| `docs/wiring.md` | **New**: wiring diagram, pin assignments from README |
77+
| `docs/firmware-development.md` | **New**: firmware dev guide with build/test/architecture content |
78+
| `docs/web-development.md` | **New**: web UI + simulator dev guide |
79+
80+
## Test Plan
81+
82+
- [x] All links in README resolve correctly (relative paths to docs/)
83+
- [x] No content lost — all information from old README exists somewhere in new structure
84+
- [x] README is concise and focuses on builder onboarding
85+
- [x] docs/wiring.md contains the full wiring diagram
86+
- [x] docs/firmware-development.md covers building, testing, and architecture
87+
- [x] docs/web-development.md covers simulator, web UI, and WebSocket protocol
88+
- [ ] Firmware builds (`pio run -e wt32_sc01_plus`) — docs-only change, no source code modified
89+
- [ ] Simulator builds (`pio run -e simulator`) — docs-only change, no source code modified

README.md

Lines changed: 27 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Compatible alternatives: Maverick ET-72/73 replacement probes (different Steinha
5555

5656
### 3D Printed Parts
5757

58-
All parametric [OpenSCAD](https://openscad.org/) (free) source files in `enclosure/`. Pre-exported STLs in `enclosure/stl/` if you just want to print.
58+
All parametric [OpenSCAD](https://openscad.org/) (free) source files in `enclosure/`. Pre-exported STLs in `enclosure/stl/` if you just want to print. See the [enclosure README](enclosure/README.md) for print settings and assembly instructions.
5959

6060
**Controller enclosure** (`bbq-case.scad`) — three parts:
6161
- **Front bezel** — holds display, bezel lip frames the screen
@@ -79,72 +79,29 @@ All parametric [OpenSCAD](https://openscad.org/) (free) source files in `enclosu
7979
- 2x small hose clamps (fan assembly to pipe, adapter to pipe nipple)
8080
- High-temp gasket tape (seal adapter to pipe nipple)
8181

82-
## Wiring
82+
## Getting Started
8383

84-
All components on the carrier perfboard are connected with short soldered traces. External connections use wire runs to panel-mount jacks and the display board.
84+
### 1. Clone and Set Up
8585

86-
```
87-
Panel-mount DC barrel jack (12V in)
88-
89-
└─► Carrier Board 12V rail
90-
├─► MP1584EN buck converter IN → OUT (set to 5.0V)
91-
│ ├─► WT32-SC01 Plus 5V (via extension cable)
92-
│ └─► Servo VCC
93-
94-
├─► IRLZ44N MOSFET drain
95-
│ └─► Fan +12V (fan GND to MOSFET source)
96-
│ Gate ◄── GPIO12 (with 10K pulldown to GND)
97-
98-
└─► GND rail (common ground)
99-
100-
WT32-SC01 Plus Extension Connector (8-pin ribbon cable)
101-
GPIO10 (SDA) ──► ADS1115 SDA (on carrier board)
102-
GPIO11 (SCL) ──► ADS1115 SCL (on carrier board)
103-
GPIO12 ──► IRLZ44N gate (on carrier board)
104-
GPIO13 ──► Servo signal (wire to servo)
105-
GPIO14 ──► Buzzer (on carrier board)
106-
3.3V ──► ADS1115 VDD + voltage divider supply
107-
5V ──► From MP1584EN output
108-
GND ──► Common ground rail
109-
110-
Probe voltage dividers (on carrier board, x3)
111-
3.3V ──[10K 1% resistor]──┬──► ADS1115 AINx
112-
113-
[0.1uF cap]
114-
115-
Panel-mount 2.5mm jack ──┴──► GND
116-
(tip=signal, sleeve=GND, polarity doesn't matter)
86+
```bash
87+
git clone https://github.com/MrMatt57/pitclaw.git
88+
cd pitclaw
11789
```
11890

119-
## Software Setup
120-
121-
### Quick Start (Windows)
122-
123-
One script installs everything you need — Git, Python, Node.js, PlatformIO CLI, and OpenSCAD:
91+
**Windows** — one script installs everything (Git, Python, PlatformIO CLI, OpenSCAD):
12492

12593
```powershell
126-
# Clone the repo
127-
git clone https://github.com/MrMatt57/pitclaw.git
128-
cd pitclaw
129-
13094
# Run from an elevated (Admin) PowerShell
13195
powershell -ExecutionPolicy Bypass -File scripts\setup-dev.ps1
13296
```
13397

134-
The script is idempotent — safe to run again anytime to verify your setup or after pulling updates that add new dependencies.
135-
136-
### Manual Prerequisites
98+
**Other platforms** — install [PlatformIO CLI](https://docs.platformio.org/en/latest/core/installation.html) (`pip install platformio`).
13799

138-
If you prefer to install tools yourself (or you're not on Windows):
100+
### 2. Wire and Assemble
139101

140-
1. [Git](https://git-scm.com/)
141-
2. [Python 3.12+](https://www.python.org/)
142-
3. [Node.js LTS](https://nodejs.org/) (for simulator/web UI development)
143-
4. [PlatformIO CLI](https://docs.platformio.org/en/latest/core/installation.html)`pip install platformio`
144-
5. [VS Code](https://code.visualstudio.com/) + [PlatformIO extension](https://platformio.org/install/ide?install=vscode)
145-
6. [OpenSCAD](https://openscad.org/) (optional, for editing enclosure designs)
102+
Solder the carrier board and wire everything up. See the [wiring guide](docs/wiring.md) for the full diagram and pin assignments.
146103

147-
### Build & Flash (one time via USB)
104+
### 3. Build and Flash
148105

149106
```bash
150107
cd firmware
@@ -161,18 +118,17 @@ pio run -e wt32_sc01_plus --target uploadfs
161118

162119
After this initial flash, all future firmware updates can be done over Wi-Fi at `http://bbq.local/update`.
163120

164-
### First Boot
121+
### 4. First Boot
165122

166-
1. Power on the device — the setup wizard starts on the touchscreen
167-
2. Select your temperature units (°F or °C)
168-
3. A QR code appears on screen — scan it with your phone to connect to the setup Wi-Fi
169-
4. Your phone auto-opens a portal page — enter your home Wi-Fi credentials
170-
5. The device joins your network and registers as `bbq.local`
171-
6. Plug in probes — the wizard shows live readings to verify they work
172-
7. The fan, servo, and buzzer do a quick self-test
173-
8. Setup complete — dashboard appears
123+
1. Power on — the setup wizard starts on the touchscreen
124+
2. Select temperature units (°F or °C)
125+
3. Scan the QR code on screen with your phone to connect to the setup Wi-Fi
126+
4. Enter your home Wi-Fi credentials in the portal page
127+
5. Plug in probes — the wizard verifies live readings
128+
6. Fan, servo, and buzzer do a quick self-test
129+
7. Setup complete — dashboard appears
174130

175-
### Accessing the Web UI
131+
### 5. Use the Web UI
176132

177133
Open `http://bbq.local` in any browser on the same Wi-Fi network.
178134

@@ -184,49 +140,14 @@ For the best experience, add it to your phone's home screen (it's a PWA):
184140

185141
Hold your finger on the touchscreen for 10 seconds during the boot splash screen.
186142

187-
### Running the Simulator (no hardware needed)
188-
189-
Develop and test the web UI without any ESP32 hardware. The simulator serves the same web UI files and speaks the same WebSocket protocol.
190-
191-
```bash
192-
cd simulator
193-
npm install # first time only
194-
npm run dev # http://localhost:3000 — auto-refreshes on file changes
195-
```
196-
197-
Edit files in `firmware/data/` (the web UI) and the browser reloads instantly. Use time acceleration to test long cooks quickly:
198-
199-
```bash
200-
npm run dev -- --speed 50 # 12-hour brisket cook in ~15 minutes
201-
npm run dev -- --profile stall # test the brisket stall scenario
202-
npm run dev -- --speed 10 --profile fire-out # test fire-out alarm at 10x
203-
```
204-
205-
Available profiles: `normal`, `stall`, `hot-fast`, `temp-change`, `lid-open`, `fire-out`, `probe-disconnect`.
206-
207-
### Running Tests
208-
209-
```bash
210-
# Desktop unit tests (PID, prediction, alarms — no hardware needed)
211-
pio test -e native
212-
213-
# On-device integration tests
214-
pio test -e wt32_sc01_plus
215-
```
216-
217-
## Web UI
218-
219-
The web interface shows:
220-
- **Live temperatures**: Pit and both meat probes with set points
221-
- **Temperature graph**: uPlot time-series chart with pit temp, meat temps, fan %, and damper %
222-
- **Predictive curve**: Dashed projection from current meat temp to target, with predicted done time
223-
- **Controls**: Set pit target temperature, meat target temperatures, alarm thresholds
224-
- **Cook timer**: Starts when pit reaches set point; tracks total cook time
225-
- **Session export**: Download cook data as CSV/JSON (device stores only current/last session — download before starting a new cook)
226-
- **OTA update**: Flash new firmware at Settings → Update
227-
- **Alarms**: Configure pit deviation band, meat targets, Pushover notifications
143+
## Development
228144

229-
The graph timeline focuses on the active cook — ramp-up time is shown compressed on the left, with the main view starting from when the pit first reaches set temperature. The chart extends to the right with a dashed predictive curve showing the projected path to the meat target temperature, with the predicted done time displayed at the end. All times shown in your browser's local timezone.
145+
| Guide | Topics |
146+
|-------|--------|
147+
| [Firmware Development](docs/firmware-development.md) | Building, flashing, testing, architecture, configuration |
148+
| [Web UI Development](docs/web-development.md) | Simulator, web UI editing, cook profiles, WebSocket protocol |
149+
| [Wiring](docs/wiring.md) | Wiring diagram, pin assignments, carrier board layout |
150+
| [Enclosure](enclosure/README.md) | 3D printing, assembly instructions, parametric customization |
230151

231152
## License
232153

0 commit comments

Comments
 (0)