The values read from the sensor are 16-bit signed integers and must be interpreted according to the Full Scale selected. By default, they are both set to 0 (±250 °/s, ±2 g).
The values read from the sensor are 16-bit signed integers and must be interpreted according to the Full Scale selected. By default, they are both set to 0 ($±250 °/s$, $±2 g$).
**g** represents the gravity of Earth and is equal to approximately $9.80665 m/s^2$.
**g** represents the gravity of Earth and is equal to approximately $9.80665 m/s^2$.
:::
:::
...
@@ -473,7 +473,7 @@ Use the provided [lab skeleton](https://github.com/UPB-PMRust/lab-2025) as a bas
...
@@ -473,7 +473,7 @@ Use the provided [lab skeleton](https://github.com/UPB-PMRust/lab-2025) as a bas
:::
:::
3. Get the acceleration and angular velocity readings from the sensor.
3. Get the acceleration and angular velocity readings from the sensor.
- Configure the full scale as **±2 g** for the acceleration and **±1000 °/s** for the angular velocity (**2p**)
- Configure the full scale as **$±2 g$** for the acceleration and **$±1000 °/s$** for the angular velocity (**2p**)
- Read the raw values for the X axis of the accelerometer and print them in a loop. (**2p**)
- Read the raw values for the X axis of the accelerometer and print them in a loop. (**2p**)
:::note
:::note
...
@@ -491,7 +491,7 @@ val = i16::from_be_bytes([val_h, val_l]);
...
@@ -491,7 +491,7 @@ val = i16::from_be_bytes([val_h, val_l]);
:::
:::
- Read and print the rest of the values. (**1p**)
- Read and print the rest of the values. (**1p**)
4. Print the actual value of the accelerations (in $m/s^2$) and the angular velocities (in °/s) (**1p**)
4. Print the actual value of the accelerations (in $m/s^2$) and the angular velocities (in $°/s$) (**1p**)
:::tip
:::tip
Make use of the values configured in the **full scale** fields.
Make use of the values configured in the **full scale** fields.