2026 remote: wiring as found on the real remote, IMU reset fix
- Nextion is on Serial2 (pins 7/8) - already in the last commit; docs updated. - MPU6050 on Wire (18/19) so everything is on the edge headers (owner's choice); the two stick wires from 18/19 move to A7/A8 (21/22). - Stick mapping checked on the real remote: left stick X/Y/twist on A3/A7/A8, right on A0/A1/A2, all inverted but the right twist. - RemoteIMU: full device reset before waking. The remote's MPU6050 (likely a clone) answers and wakes without it but every data register reads 0. Axis defaults confirmed (+pitch nose down, +roll right side down). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0b836af8de
commit
aeccba3be7
4 files changed
+41
-39
No files matched your search
@@ -16,34 +16,27 @@ at 100 Hz.
|
||||
`BATTERY_SENSE_PIN = A6` in `Config.h` once it's wired. A low-battery
|
||||
warning is still to do.
|
||||
|
||||
- **IMU on the normal pin headers** (suggestion, not done): with the GY-521 on
|
||||
the main board, wire it to Wire (SDA 18 / SCL 19) instead of Wire2 (the
|
||||
24/25 pads under the Teensy 4.0). 18/19 are A4/A5, used by two stick axes
|
||||
now, so move those two axes to A7 (pin 21) and A8 (pin 22): all on the
|
||||
edge headers. A6 (pin 20) stays free for the battery divider, A9 (23) is
|
||||
spare. Firmware: in `Config.h` `STICK_PINS = { A0, A1, A2, A3, A7, A8 }`
|
||||
and `#define IMU_WIRE Wire`; `Sticks.cpp` reads through `STICK_PINS`, so
|
||||
nothing else changes. Redo the stick axis check (`p` dump) and calibration
|
||||
afterwards. (Wire1 is no way out: its 16/17 are stick pins A2/A3 too.)
|
||||
|
||||
## Building
|
||||
|
||||
From the `2026-current` folder: `pio run -e remote`, flash with
|
||||
`pio run -e remote -t upload`, monitor with `pio device monitor -e remote`.
|
||||
|
||||
## Wiring (from the old remote sketch in `../../2019-teensy-nrf24/remote/`; edit `Config.h` if yours differs)
|
||||
## Wiring (edge headers only; edit `Config.h` if yours differs)
|
||||
|
||||
| Part | Signal | Teensy 4.0 pin |
|
||||
|------|--------|----------------|
|
||||
| nRF24L01 | MOSI / MISO / SCK | 11 / 12 / 13 (SPI0) |
|
||||
| nRF24L01 | CE / CSN | 9 / 10 |
|
||||
| nRF24L01 | VCC | 3.3 V, with a 10–100 µF cap right at the module |
|
||||
| MPU6050 | SDA / SCL | **25 / 24 (Wire2)**, solder pads on the underside of the 4.0: not 18/19, those are stick pins A4/A5 |
|
||||
| MPU6050 | SDA / SCL | **18 / 19 (Wire)** |
|
||||
| Nextion | TX → RX2, RX ← TX2 | 7 / 8 (Serial2), 5 V supply (found on the real remote) |
|
||||
| Sticks | 6 axes | A0–A5. Which axis is on which pin isn't known yet: reorder `STICK_PINS` until the `p` dump reads right |
|
||||
| Sticks | 6 axes | left stick X / Y / twist on **A3 / A7 / A8** (17 / 21 / 22), right stick on **A0 / A1 / A2** (14 / 15 / 16). A7/A8 hold the two wires that were on A4/A5 (18/19). All but the right twist read inverted (`STICK_INVERT`). Checked on the real remote |
|
||||
| Battery (planned) | divider | A6 (20) |
|
||||
|
||||
**MPU6050 rewiring:** the old remote had its MPU code switched off, probably
|
||||
because A4/A5 double as Wire's pins. Move the MPU's SDA/SCL to pins 25/24 (the pads under the board).
|
||||
**Rewiring from the old remote:** move the two stick wires from 18/19 to
|
||||
21/22, then put the MPU on 18/19 (Wire). The old remote had its MPU code
|
||||
switched off, probably because A4/A5 double as Wire's pins. Redo the stick
|
||||
axis check (`p` dump) and the sweep calibration afterwards.
|
||||
|
||||
Stick pots are wired 3.3 V – wiper – GND. **Never feed 5 V into a Teensy
|
||||
4.x analog pin.**
|
||||
|
||||
Reference in new issue
Block a user