Refactor mcu code. Closes #11

This commit is contained in:
osiu97
2026-07-08 20:25:20 +02:00
parent 930940b1ba
commit 33436fafc4
9 changed files with 474 additions and 357 deletions
+6 -2
View File
@@ -110,7 +110,11 @@ esp32c3-wiji/
├── platformio.ini # PlatformIO config (env: esp32-c3-devkitm-1)
├── fivebarIKGame.js # REFERENCE ONLY — original site's kinematics (do not import)
├── src/
── main.cpp # ESP32 firmware (BLE + AccelStepper)
── Config.h # Pins, Constants, UUIDs
│ ├── BleManager.cpp # BLE setup, callbacks, notifications
│ ├── MotorController.cpp # AccelStepper wrap, homing state, idle timeout
│ ├── StatusLed.cpp # Onboard LED feedback logic
│ └── main.cpp # Main app glue, command router
└── web/
├── styles/
│ ├── base.css # CSS variables, reset, typography, layout primitives
@@ -387,7 +391,7 @@ The `?v=Date.now()` on imports handles this automatically on page load.
- JSON export to persist sequences to `sequences.json`.
- Quick Sequences UI in `stepper-test`, `board-control`, and `input-text`.
- Shared `sequence-runner.js` to handle asynchronous execution and delays.
- [x] Firmware (`src/main.cpp`) — AccelStepper + BLE command parser + position NOTIFY
- [x] Firmware (Modularized) — `BleManager`, `MotorController`, `StatusLed`, and `main.cpp` for routing.
---