Skip to content
sunsidedPublic

About

Rust no_std driver and register map for the InvenSense MPU-6050 and MPU-6000 IMUs: I²C and SPI, blocking and async embedded-hal, for bare-metal HALs, Embassy and Linux

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

InvenSense MPU-6050 IMU

CI codecov License Safety Dance

Platform-agnostic Rust support for the InvenSense MPU-6050 accelerometer and gyroscope.

Status: runs on hardware: an MPU-6050 module on an ESP32-C3, on I²C at 100 kHz, with init and read_sample paced by the data-ready interrupt. SPI, the FIFO, the self-test, calibration, the motion interrupt, cycle mode and DMP access are tested against a behavioral model of the chip only.

Crate Version Description
mpu6050-registers crates.io A typed map of the MPU-6050's registers.
mpu6050-ng crates.io A blocking and async embedded-hal driver.
mpu6050-sim not published A behavioral model for host tests.
flowchart LR
    hal[embedded-hal /<br/>embedded-hal-async] --> ng[mpu6050-ng]
    regs[mpu6050-registers] --> ng
    regs --> sim[mpu6050-sim]
    fake[fake-bus] --> sim
    sim -. tests, doctests, fuzzing .-> ng
Loading

The driver is mpu6050-ng because the mpu6050 name on crates.io belongs to an older, unrelated crate.

task ci            # all checks, tests, embedded builds, MSRV, fuzz build and Kani proofs
task build:xtensa  # the Xtensa ESP32 build; needs the esp toolchain

Releasing

release-plz does the releases (see CONTRIBUTING.md). Each merge to main updates a release PR. Merging it tags the changed crates (mpu6050-registers-vX.Y.Z, vX.Y.Z for mpu6050-ng) and creates the GitHub Releases. Each tag runs the publish workflow, which publishes the crate to crates.io via trusted publishing (no API token in the repository).

License

Copyright © 2026 Markus Mayer

Triple licensed under your choice of either of:

Contributing

See CONTRIBUTING.md. Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this work by you shall be triple licensed as above, without any additional terms or conditions.

About

Rust no_std driver and register map for the InvenSense MPU-6050 and MPU-6000 IMUs: I²C and SPI, blocking and async embedded-hal, for bare-metal HALs, Embassy and Linux

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages