pico-bno055-rs
Have a Raspberry Pi Pico get its realtime orientation data from a Bosch BNO055 Inertial Measurement Unit and write the to the host computer via serial USB connection.
Get Started
-
Install the latest version of Rust. This is the language in which this program is written.
-
Install the
thumbv6m-none-eabi
target. This lets us compile our Rust program into a language understood by the Pico
rustup self update
rustup update stable
rustup target add thumbv6m-none-eabi
- Install the Rust port of ELF2UF2. This is used for flashing the program to the board
cargo install elf2uf2-rs
- Install Clippy. This is used to help lint the Rust code
rustup component add clippy
- Install just. This is used for running certain tasks, (
just build
will build the program, for example)
cargo install just
- Build the project to make sure everything's setup correctly
just build
And you're good to go! If you want to do some debugging as well, do the following optional steps.
Flashing the program to the Pico
To flash the program to the Pico:
- Plug in the Pico to your host machine in bootloader mode (with the on-board button held down)
- Run
just flash
Quaternion Data Live
View- With the program flashed to the Pico, plug in the Pico via USB to the host computer
- Locate the serial port on the host computer (COM... on Windows, /dev/tty... on POSIX)
- Edit
debug-quaternion.py
to use the serial port to which the Pico is connected - Run
python scripts/debug-quaternion.py