Skip to content

feat: add mpu-6000 example#15

Merged
alexandruradovici merged 2 commits into
UPB-PMRust:mainfrom
genan2003:main
Jun 13, 2026
Merged

feat: add mpu-6000 example#15
alexandruradovici merged 2 commits into
UPB-PMRust:mainfrom
genan2003:main

Conversation

@genan2003

Copy link
Copy Markdown
Collaborator

Pull Request Overview

This pull request adds an example for MPU-6000 sensor.

According to the datasheet the sensor differs from the MPU-6500 in the following way:

  • The default value of WHO_AM_I register is 0x68 rather than 0x70 for the MPU-6500
  • The MPU-6000 requires SPI Mode 3 (CPOL=1, CPHA=1) in order to work
  • We have to disable the I2C interface, since the sensor will be used with the SPI interface
  • To begin reading we must set the register PWR_MGMT_1 we must clear the SLEEP bit

The readings from the sensor are computed the same as before, so is just extra configuration of the device.

TODO or Help Wanted

This pull request still needs review.

Build

  • Ran cargo fmt.
  • Ran cargo build.
  • Ran cargo clippy.

Author

Signed-off-by: Genan Omer genan.omer@stud.fils.upb.ro

@alexandruradovici alexandruradovici added this pull request to the merge queue Jun 13, 2026
Merged via the queue into UPB-PMRust:main with commit f58cae4 Jun 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants