13 Commits
Author SHA1 Message Date
jessikitty 37ec5e422f Document tank drive layout and NVS pairing reset 2026-09-01 23:43:41 +10:00
jessikitty fffb4fcb0d Switch to tank drive - one input per motor, no mixing
Arcade drive mixed forward and turn onto the left stick, so one stick
commanded both track motors. Replaced with tank drive and moved the head
off the right stick onto the d-pad, so every control now maps to exactly
one motor.

- left stick Y  -> left track      (was: mixed into both)
- right stick Y -> right track     (was: head tilt)
- d-pad U/D     -> head tilt       (was: right stick Y)
- d-pad L/R     -> head turn       (was: right stick X)
- Square/Circle -> left arm        (was: d-pad U/D)
- Triangle/Cross-> right arm       (unchanged)
- L2/R2         -> body lift       (unchanged)
- L1+R1 together-> all stop        (was: Circle)

Head is digital now rather than proportional, so HEAD_MAX drops to 45.
Stick X axes are unused. Also added a commented-out forgetBluetoothKeys()
call for clearing stale NVS pairings.
2026-09-01 23:43:11 +10:00
jessikitty 1ca4bda441 Fix build: hoist all type declarations above the first function
The Arduino IDE injects generated prototypes immediately before the first
function definition in the sketch. clearDesired() sat above struct Hub and
struct PortThrottle, so prototypes referencing those types were emitted
before the types existed. Moved all structs and enums into one block at the
top, and documented the constraint in the header so it does not recur.
2026-09-01 23:29:24 +10:00
jessikitty 8532393a19 Update for Johnny 5 build: controls doc, notification decoding, end-stop warning 2026-09-01 23:23:42 +10:00
jessikitty 982b396f58 Document port map, control layout, power caps and rate limits 2026-09-01 23:23:10 +10:00
jessikitty 3e553332eb Add port auto-detect via notifications, and the Johnny 5 control mapping
- Subscribe to the LWP3 characteristic and decode Hub Attached I/O (0x04)
  so the hub reports its own port inventory at connect, plus Generic Error
  (0x05) so rejected commands stop vanishing silently.
- Map all 7 motors: arcade drive, head tilt/turn, body lift on the analog
  triggers, arms on d-pad and face buttons.
- Add a per-hub rate limit. Four motors on hub 1 exceeded what the per-port
  throttle alone would hold back.
- Fix track sides: port A is right, port B is left.
2026-09-01 23:22:48 +10:00
jessikitty f2645ce729 Point setup at docs/BUILD.md, add repo layout 2026-09-01 22:44:05 +10:00
jessikitty 6f93f938cb Add platform.local.txt override, for restoring after package updates
Copy to Arduino15/packages/esp32-bluepad32/hardware/esp32/4.1.0/
2026-09-01 22:43:30 +10:00
jessikitty 0829b7dbbb Add Windows build and deployment guide 2026-09-01 22:43:23 +10:00
jessikitty 84020281ee Include btstack.h instead of uni.h; note the include-path prerequisite
Nothing in the sketch calls a uni_ function - bd_addr_t, sscanf_bd_addr,
gap_connect and the gatt_client calls are all BTstack.
2026-09-01 22:42:49 +10:00
jessikitty 11d47c27e2 Document threading rules, boot order, LWP3 encoding and open questions 2026-08-28 10:11:31 +10:00
jessikitty 3729ded5a0 Add single-board sketch: Bluepad32 gamepad + LWP3 GATT client on BTstack 2026-08-28 10:10:58 +10:00
jessikitty 728516b585 Initial commit 2026-08-28 10:10:03 +10:00