Kode Dot

Motion

How a Kode Dot knows which way is down, how fast it is turning and where north is, and why that takes two chips.

What it is

A motion sensor answers three questions about the Kode Dot: which way is down, how fast it is turning, and where north is. Three small sensors answer them, three axes each, which is where "9-axis" comes from.

The first two share one chip: they are both made of tiny moving structures etched in silicon, and one die can hold both. A magnetometer is a different kind of sensor, a magneto-resistive bridge, and lives in a chip of its own. That is why the Kode Dot carries two parts for one job: a QMI8658A for the accelerometer and the gyroscope, and a QMC5883P for the compass.

Used together they cover for each other. The accelerometer knows down but not north; the compass knows north but tilts with the board; the gyroscope is fast and smooth but drifts. A heading that stays right while you move the Kode Dot is the three combined, which is what "sensor fusion" means.

How it is connected

flowchart LR
p4["ESP32-P4"] -- "I2C, 0x6A" --> imu["QMI8658A, accelerometer + gyroscope"]
p4 -- "I2C, 0x2C" --> mag["QMC5883P, magnetometer"]
Both parts sit on the P4's shared I2C bus, each at its own address

Both chips hang off the P4's shared I2C bus, GPIO4 for data and GPIO5 for clock at 400 kHz, next to the panel expander, the audio codec, the charger, the fuel gauge and the touch controller. kode_bsp_init brings that bus up and owns it; your code asks for the handle with kode_bsp_i2c() and adds each sensor to it. A bus scan finds both at their own addresses.

Apps that use it

On the marketplace, apps that put this part to work. Install one from start/first-app and see it before you write a line.

The parts

PartWhat it gives youPage
QMI8658AAcceleration and rotation rate, three axes each, plus a die thermometerdevice/motion/imu
QMC5883PMagnetic field, three axes: a compassdevice/motion/magnetometer

In the SDK