API for the hub built-in IMU.
More...
API for the hub built-in IMU.
◆ hub_imu_get_acceleration()
| void hub_imu_get_acceleration |
( |
float | accel[3] | ) |
|
Get the acceleration by the IMU.
- Parameters
-
| accel | Float array to store the x/y/z axes acceleration[mm/s^2]. |
◆ hub_imu_get_angular_velocity()
| void hub_imu_get_angular_velocity |
( |
float | angv[3] | ) |
|
Get the angular velocity by the IMU.
- Parameters
-
| angv | Float array to store the x/y/z axes angular velocity [°/s]. |
◆ hub_imu_get_heading()
| float hub_imu_get_heading |
( |
void | | ) |
|
Get the heading angle of the IMU.
- Return values
-
◆ hub_imu_get_temperature()
| float hub_imu_get_temperature |
( |
void | | ) |
|
Get the temperature by the IMU.
- Return values
-
◆ hub_imu_init()
| pbio_error_t hub_imu_init |
( |
void | | ) |
|
Initialize the IMU driver.
- Return values
-
| PBIO_SUCCESS | Successfully initialized. |
| PBIO_ERROR_FAILED | Failed to initialized. |
◆ hub_imu_is_ready()
| bool hub_imu_is_ready |
( |
void | | ) |
|
Check if the IMU module is "ready.".
- Return values
-
| true | Module is ready. |
| false | Module still needs more quiet time. |
◆ hub_imu_is_stationary()
| bool hub_imu_is_stationary |
( |
void | | ) |
|
Check if the IMU module is "stationary.".
- Return values
-
| true | Module is stationary. |
| false | Module is in motion. |
◆ hub_imu_set_tilt()
| void hub_imu_set_tilt |
( |
float | angle | ) |
|
Set the tilt angle of the IMU module.
- Parameters
-
| angle | Tilt angle (wrt the Y-axis) in degrees. |