2026 remote: build for the Teensy 4.0 actually in the remote
Board teensy41 -> teensy40. All pins exist on the 4.0; the MPU6050's Wire2 (SDA2 25 / SCL2 24) is on the underside solder pads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
769d72462d
commit
e23216b3a1
7 files changed
+20
-18
No files matched your search
@@ -10,7 +10,7 @@ before changing anything.
|
||||
|
||||
```
|
||||
robot/ Teensy 3.6 firmware (PlatformIO env robot)
|
||||
remote/ Teensy 4.1 firmware (PlatformIO env remote)
|
||||
remote/ Teensy 4.0 firmware (PlatformIO env remote)
|
||||
shared/HexapodProtocol/ wire protocol, used by robot, remote and sim
|
||||
sim/ robot firmware -> hexapod_sim.dll (CMake + g++), headless smoke test
|
||||
Hexapod_Simulation_Unity/ Unity 6000.6 project that loads the DLL (Assets/HexapodSim/)
|
||||
@@ -34,7 +34,7 @@ PlatformIO, one `platformio.ini`, two environments:
|
||||
| Env | Board | Sketch dir | Purpose |
|
||||
|-----|-------|------------|---------|
|
||||
| `robot` | `teensy36` | `robot/` | walking robot |
|
||||
| `remote` | `teensy41` | `remote/` | handheld transmitter |
|
||||
| `remote` | `teensy40` | `remote/` | handheld transmitter |
|
||||
|
||||
- `shared/` is PlatformIO's `lib_dir`. `shared/HexapodProtocol/` is a
|
||||
header-only library both sketches `#include <HexapodProtocol.h>`.
|
||||
@@ -108,7 +108,7 @@ joint-rate clamp → servos.
|
||||
| `Comms` | nRF24 RX, link timeout, `injectPacket()` for the harness |
|
||||
| `ServoDriver` | 18 servos on hardware PWM (50 Hz, 16-bit), per-servo calibration from `Config.h` `SERVOS`, duty 0 = relaxed, skips invalid IK solutions |
|
||||
|
||||
## Remote architecture (`remote/`, Teensy 4.1)
|
||||
## Remote architecture (`remote/`, Teensy 4.0)
|
||||
|
||||
Loop: drain Nextion + USB serial input every pass. On each `TX_HZ` (100)
|
||||
tick: sticks → IMU → radio link status → RemoteState (smoothers,
|
||||
@@ -366,7 +366,7 @@ Robot (`robot/README.md` has detail):
|
||||
Remote (`remote/README.md` has detail):
|
||||
- Pins in `remote/Config.h`, taken from the old remote sketch: radio CE 9 /
|
||||
CSN 10, sticks A0–A5, Nextion on Serial1 (0/1). The MPU6050 is on
|
||||
**Wire2 (25/24)**, since A4/A5 = Wire's SDA/SCL are stick pins; that's
|
||||
**Wire2 (25/24, solder pads under the Teensy 4.0)**, since A4/A5 = Wire's SDA/SCL are stick pins; that's
|
||||
the owner's choice and needs rewiring the MPU. Which stick axis is on
|
||||
which pin is still unknown.
|
||||
- `STICK_INVERT[]`, calibration defaults, deadzones, expo.
|
||||
@@ -393,7 +393,7 @@ Remote (`remote/README.md` has detail):
|
||||
- `b2` → **Nextion upload passthrough**: shows `uploadscreen`, then
|
||||
bridges USB ↔ Serial1 forever, so Nextion Editor can upload a `.tft`
|
||||
through the remote's USB port. The new firmware keeps this.
|
||||
- Sticks on **A0–A5**, contiguous (`analogInPin + i`). On the Teensy 4.1,
|
||||
- Sticks on **A0–A5**, contiguous (`analogInPin + i`). On the Teensy 4.0,
|
||||
A4/A5 are pins 18/19 = Wire SDA/SCL, which the MPU6050 needs. The old
|
||||
code had the MPU code disabled (`if (false)`). Owner's decision: keep
|
||||
the sticks, move the MPU to Wire2.
|
||||
|
||||
Reference in new issue
Block a user