TinyML Arduino Board Migration: Recheck the Motion Model’s Sensor Contract on Rev2
Changing the IMU library can make an older Arduino motion classifier compile on Nano 33 BLE Sense Rev2. It does not establish that the model still receives the same motion sequence. A fixed sample count can cover a different duration, and driver-level coordinate handling can alter assumptions made during training.
Use the historical Arduino gesture tutorial as a concrete input contract to migrate. Its runtime API and installation instructions are legacy material; this article does not present them as a current TFLM setup recipe.
Identify the sensor change before editing the sketch
Arduino identifies the original Nano 33 BLE Sense with an LSM9DS1 IMU. The Rev2 datasheet, section 2.3 instead identifies BMI270 acceleration/gyroscope sensing plus BMM150 magnetic sensing.
The historical capture sketch collects 119 rows with six columns: acceleration X/Y/Z followed by gyroscope X/Y/Z. It begins after the sum of absolute acceleration components reaches its configured threshold.
That trigger is not the Euclidean vector magnitude. Replacing it with a differently defined “motion threshold” changes where a gesture window begins, even if the new sensor reports the same physical units.
A fixed number of rows does not fix the duration
The examined LSM9DS1 driver configures acceleration and gyroscope for 119 Hz. The examined BMI270 driver configures both for 100 Hz in its default setup.
At ideal steady rates, collecting 119 new samples budgets approximately one second at 119 Hz but 1.19 seconds at 100 Hz. Actual collection time also depends on where the first sample falls, polling and transfer behavior. Keeping numSamples unchanged therefore preserves tensor length while changing the motion timescale.
Do not simply reduce the count to 100 and feed a shorter tensor to an unchanged model. Choose deliberately: reproduce the trained sampling contract through a validated acquisition/resampling path, or collect new training data using the new board's actual pipeline and train for that representation. Measure delivered sample timing rather than relying only on a driver rate getter.

Preserve physical units and board coordinates
Both examined drivers return acceleration scaled in g and angular velocity in degrees per second for the discussed defaults. The BMI270 implementation additionally remaps native X/Y values under its Nano 33 BLE target condition: it returns negative native Y as X and negative native X as Y, with Z retained.
That remapping may already account for the board's sensor orientation. Do not add a second axis swap based solely on the chip's own coordinate drawing. Compare board-level static orientations and controlled rotations, checking signs and channel order at the application boundary.
Also check the configured measurement ranges. A conversion written for raw integers is inappropriate when the library has already scaled readings into physical units. Conversely, changing sensor range without updating a custom conversion can distort every model input while keeping the waveform visually recognizable.
Compare the exact model-ready vector
The historical classifier sketch stores six float values per sample. Its acceleration normalization is (a + 4) / 8; gyroscope normalization is (g + 2000) / 4000. These transformations belong to that trained example, not arbitrary motion models.
Capture a short diagnostic record at three boundaries: physical-unit sensor output, triggered sample window and normalized model input. Compare channel order, sign, sample count and elapsed duration. Reject failed sensor reads rather than adding their results to the window; the historical sketch's simple acquisition loop is not a complete production error policy.
Finally, evaluate representative gestures and non-gestures on the new board. A successful inference call verifies execution, not equivalence of the sensor distribution. The migration is complete only when the chosen acquisition contract and model are validated together. No board measurement, training run or accuracy result is claimed here.