eldruin / lsm303agr-rs

Platform agnostic Rust driver for the LSM303AGR ultra-compact high-performance eCompass module: ultra-low-power 3D accelerometer and 3D magnetometer
Apache License 2.0
18 stars 14 forks source link

Add methods to verify device id #2

Closed robyoung closed 3 years ago

robyoung commented 3 years ago

Add methods to read and also verify the device ID. These are useful for quickly checking if the device is available on the bus.

You can see this done in the microbit-dal here and then used to detect which accelerometer is connected here.

robyoung commented 3 years ago

Absolutely, done. I haven't had a chance to test them yet. I'll have access to a linux machine a bit later.

robyoung commented 3 years ago

Ok, that should be working now.