mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-04-21 23:45:42 +02:00
Format hints as bullet-points.
This commit is contained in:
parent
d513109b92
commit
956c137e51
@ -1,16 +1,18 @@
|
|||||||
# Compass
|
# Compass
|
||||||
|
|
||||||
We will read the direction from an I2C compass, and log the readings to a serial port.
|
We will read the direction from an I2C compass, and log the readings to a serial port. If you have
|
||||||
|
time, try displaying it on the LEDs somehow too, or use the buttons somehow.
|
||||||
|
|
||||||
Hint: check the documentation for the [`lsm303agr`](https://docs.rs/lsm303agr/latest/lsm303agr/) and
|
Hints:
|
||||||
[`microbit-v2`](https://docs.rs/microbit-v2/latest/microbit/) crates, as well as the
|
|
||||||
[micro:bit hardware](https://tech.microbit.org/hardware/). The LSM303AGR Inertial Measurement Unit
|
|
||||||
is connected to the internal I2C bus. TWI is another name for I2C, so the I2C master peripheral is
|
|
||||||
called TWIM. You can also look at the
|
|
||||||
[nRF52833 datasheet](https://infocenter.nordicsemi.com/pdf/nRF52833_PS_v1.5.pdf) if you want, but it
|
|
||||||
shouldn't be necessary for this exercise.
|
|
||||||
|
|
||||||
If you have time, try displaying it on the LEDs somehow too, or use the buttons somehow.
|
- Check the documentation for the [`lsm303agr`](https://docs.rs/lsm303agr/latest/lsm303agr/) and
|
||||||
|
[`microbit-v2`](https://docs.rs/microbit-v2/latest/microbit/) crates, as well as the
|
||||||
|
[micro:bit hardware](https://tech.microbit.org/hardware/).
|
||||||
|
- The LSM303AGR Inertial Measurement Unit is connected to the internal I2C bus.
|
||||||
|
- TWI is another name for I2C, so the I2C master peripheral is called TWIM.
|
||||||
|
- You can also look at the
|
||||||
|
[nRF52833 datasheet](https://infocenter.nordicsemi.com/pdf/nRF52833_PS_v1.5.pdf) if you want, but
|
||||||
|
it shouldn't be necessary for this exercise.
|
||||||
|
|
||||||
`src/main.rs`:
|
`src/main.rs`:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user