Embedded rust question

Does rust have compass and gyroscope liberery?
I am working on embedded rust. Does anyone know pls tell me

A quick search on crates.io turns up a few results for compass and gyroscope. What crate would be appropriate depends on what hardware is providing the compass and gyroscope. You may get better results searching directly for the name of the board.

1 Like

I am using stm32f3

After some more searching, I believe what you want is the l3gd20 crate for the gyroscope and the lsm303dlhc crate for the compass, since those are the gyroscope and compass on the stm32f3 board. You can find examples of how to use them to access the gyroscope and compass in the documentation of the f3 crate, which re-exports both of those crates as well as the hardware abstraction layer for the stm32f3.

1 Like