Physical task pad for the Prechin STC89C52RC experiment board: keys + LCD1602 progress, optional ESP8266 NodeMCU Wi-Fi UART tunnel + SSD1306 OLED detail panel, and a PC hub that can talk to ZCode hooks / Grok Bot / Cursor adapters.
Status
- Core open-source scope: MCU firmware (
firmware/), PC hub (bridge/), ESP8266 Wi-Fi + OLED sketch (esp8266/).- ZCode hooks (
hooks/,zcode-plugin/) are currently the most complete path for live LCD/OLED progress.- Cursor / Grok Bot adapters are incomplete: code is in the tree but unfinished — brittle START launch and limited end-to-end coverage. Prefer ZCode hooks + hub for daily use; treat Cursor / Grok as experimental.
- Keep
launch_on_start: falseunless you intentionally want K3 to spawn agent jobs.This tree is sanitized for open source. Copy example configs; never commit secrets.
STC89C52 --UART 9600--> ESP8266 (optional Wi-Fi tunnel) --TCP :8870--> bridge.py hub (:8765)
\-- USB CH340 COM (optional, conflicts with K1/K2) --/
LCD1602 short progress (STAT|...)
OLED dir / model / ctx (used/total) / status
ZCode hooks -> push_lcd.py -> POST /oled + /progress
Grok webhook routine + taskpad_ctl.py
| Path | What |
|---|---|
firmware/ |
STC89C52 Keil C51 sources + taskpad51.hex |
esp8266/taskpad_wifi_bridge/ |
NodeMCU sketch (UART–TCP + OLED intercept) |
bridge/ |
Python hub: serial/Wi-Fi mux, HTTP API, MCP |
zcode-plugin/ |
Local marketplace plugin (hooks + MCP client) |
hooks/ |
Standalone push_lcd.py (same as plugin hooks) |
PROTOCOL.md |
UART line protocol |
| Role | Wiring notes |
|---|---|
| LCD1602 | P0 data; RS/RW/EN = P2.6 / P2.5 / P2.7 |
| Buzzer | P1.5 (active low) |
| K3 START | P3.2 |
| K4 CYCLE | P3.3 |
| K2 ACK | P3.0 (RXD) — only while DONE; USB UART uses the same pins |
| ESP TX → STC P30, ESP RX ← P31 | Remove P30–URX / P31–UTX shorting caps; level-shift STC→ESP; shared GND |
| OLED SSD1306 I2C | NodeMCU G / 3V3 / D1 / D2 = GND / VDD / SCK / SDA |
| Flash ESP | Unplug UART Dupont wires; use NodeMCU USB |
- Keil C51, chip
STC89C52, addfirmware/*.c, crystal 11.0592 MHz - Or flash the prebuilt
firmware/taskpad51.hexwith STC-ISP
Release asset:taskpad51-stc89c52.hex
cd bridge
python -m pip install -r requirements.txt
copy .env.example .env
copy config\config.example.json config\config.json
notepad .env
python bridge.pyHub: http://127.0.0.1:8765
Wi-Fi tunnel listen: :8870 (transport: auto)
Set launch_on_start to false if you only want LCD/OLED progress from ZCode hooks (no K3 job launch).
cd esp8266\taskpad_wifi_bridge
copy secrets.h.example secrets.h
notepad secrets.hFlash with Arduino IDE / arduino-cli (esp8266:esp8266:nodemcuv2), or use the release binary taskpad-wifi-bridge-nodemcu.bin (built with placeholder Wi-Fi settings — fill secrets.h and rebuild for real use).
- Add marketplace folder
zcode-plugin/ - Install plugin taskpad51
- Run
python hooks/install_hooks_paths.py, or edit hooks so each command points at your Python + this repo’shooks/push_lcd.py(ASCII path recommended) - Keep the bridge running; optional MCP
http://127.0.0.1:8765/mcp
OLED context is read from ZCode ~/.zcode/cli/rollout/model-io-<session>.jsonl when hook temp transcripts disappear. Optional: copy hooks/oled_prefs.example.json to oled_prefs.json for model label / context total.
- Create a webhook routine; put the URL in
bridge/.envasGROK_WEBHOOK_URL= python taskpad_ctl.py progress "thinking" "plan"/done "ok"/idle
Note: Grok Bot and Cursor adapters are incomplete — see Status above.
- Do not commit
.env,secrets.h, redeem codes, orbridge/inbox/* - Rotate Wi-Fi / API keys if they ever lived in a shared folder
- Hook debug logs may contain workspace paths — keep them local
GPLv3 — Copyright (C) 2026 DNTOF / Cache Allow