diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..45c837d --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +# local editor settings +.vscode/ diff --git a/2026-current/remote/Config.h b/2026-current/remote/Config.h index 20b2f4c..d19fb1c 100644 --- a/2026-current/remote/Config.h +++ b/2026-current/remote/Config.h @@ -69,9 +69,9 @@ constexpr float STICK_EXPO[NUM_AXES] = { 0.25f, 0.25f, 0.30f, 0.20f, 0.20f, // One-pole low-pass on raw ADC counts (1 = no filtering). Pots are noisy. constexpr float STICK_FILTER_ALPHA = 0.5f; -// ---- Remote IMU: MPU6050 on the third I2C bus (Wire2: SDA2 = 25, SCL2 = 24) ---- +// ---- Remote IMU: MPU6050 on the third I2C bus (Wire2: SDA2 = 25, SCL2 = 24) ---- // On the Teensy 4.0, 24/25 are solder pads on the underside, not edge pins. -// Not Wire (18/19): those pins are stick axes A4/A5. Not Wire1 (17/16) either: +// Not Wire (18/19): those pins are stick axes A4/A5. Not Wire1 (17/16) either: // those are stick axes A3/A2. #define IMU_WIRE Wire2 constexpr uint8_t IMU_ADDR = 0x68; // 0x69 if AD0 is pulled high @@ -118,10 +118,10 @@ constexpr uint32_t NEXTION_BAUD = 115200; // Controls live on this page (remote/NEXTION.md). Its components must have // vscope = global, so the firmware can update them whichever page is showing. #define NEXTION_CONTROL_PAGE "control" -// The old HMI's link-status texts (pages 1 and 3, both named t1), also -// vscope = global. BENCH: use your real page names (Nextion's default -// names are page0..page5; only page 4 "uploadscreen" is known). -constexpr const char* NEXTION_STATUS_TEXTS[] = { "page1.t1", "page3.t1" }; +// The old HMI's link-status texts, also vscope = global. Its pages are +// 0 splashsceen (sic), 1 main, 2 servocal, 3 page0, 4 uploadscreen, +// 5 joysticks; the texts are t1 on page 1 (main) and page 3 (page0). +constexpr const char* NEXTION_STATUS_TEXTS[] = { "main.t1", "page0.t1" }; // The old HMI's "upload" button: page 1, component id 5 (b2), sends the // standard touch event. It puts the remote into Nextion upload passthrough. constexpr uint8_t NEXTION_UPLOAD_BUTTON_PAGE = 1; diff --git a/2026-current/remote/NEXTION.md b/2026-current/remote/NEXTION.md index d5205c1..f55922e 100644 --- a/2026-current/remote/NEXTION.md +++ b/2026-current/remote/NEXTION.md @@ -1,12 +1,25 @@ # Nextion HMI build guide -Start from your existing HMI (`../../2019-teensy-nrf24/remote-nextion/remote.HMI`, the servo -monitor) and **add one page named `control`** with the components below. +Work in `remote.HMI` in this folder (a copy of the old servo monitor, +`../../2019-teensy-nrf24/remote-nextion/remote.HMI`, re-saved by a newer +Nextion Editor) and **add one page named `control`** with the components below. + +The old HMI's pages: + +| # | Name | Contents | +|---|------|----------| +| 0 | `splashsceen` (sic) | start page | +| 1 | `main` | `t1` link status, `b2` (id 5) upload mode | +| 2 | `servocal` | servo calibration (not used by this firmware) | +| 3 | `page0` | servo sliders `h0`–`h17`, `t1` link status. Note the name: `page page0` opens this page, `page 0` (a number) opens the splash | +| 4 | `uploadscreen` | shown during upload mode | +| 5 | `joysticks` | not used by this firmware | + Your existing pages keep working: | Existing | What the firmware does with it | |----------|--------------------------------| -| page 1 `t1`, page 3 `t1` | writes `connected` / `not connected`, as the old firmware did. Set both to **vscope = global**, and put their real names (`page1.t1`, …) in `NEXTION_STATUS_TEXTS` in `Config.h` | +| page 1 `t1`, page 3 `t1` | writes `connected` / `not connected`, as the old firmware did, as `main.t1` and `page0.t1` (`NEXTION_STATUS_TEXTS` in `Config.h`). Set both to **vscope = global** | | page 1 `b2` (id 5) | **upload mode**: keep "Send Component ID" ticked on it. The remote shows `uploadscreen` and passes USB straight through to the display, so Nextion Editor can upload over the remote's USB port. Power-cycle to leave. Serial key `U` does the same | | page 4 `uploadscreen` | shown on entering upload mode | | page 3 sliders `h0`–`h17` | not driven yet: the robot doesn't send servo positions back (that needs the planned telemetry channel) | diff --git a/2026-current/remote/remote.HMI b/2026-current/remote/remote.HMI new file mode 100644 index 0000000..d7b0dd5 --- /dev/null +++ b/2026-current/remote/remote.HMI @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:52fc62dcb582a2b4bbb4bff4f36bf6d94798fd3b93eb99c1c03627200dd0ea3c +size 8512370