MetaWear C++ API
0.18.0
C++ implementation of the MetaWear protocol
|
Functions for interacting with the BMI160 gyro. More...
#include "sensor_common.h"
Go to the source code of this file.
Enumerations | |
enum | MblMwGyroBmi160Odr { MBL_MW_GYRO_BMI160_ODR_25Hz = 6, MBL_MW_GYRO_BMI160_ODR_50Hz, MBL_MW_GYRO_BMI160_ODR_100Hz, MBL_MW_GYRO_BMI160_ODR_200Hz, MBL_MW_GYRO_BMI160_ODR_400Hz, MBL_MW_GYRO_BMI160_ODR_800Hz, MBL_MW_GYRO_BMI160_ODR_1600Hz, MBL_MW_GYRO_BMI160_ODR_3200Hz } |
Available output data rates on the BMI160 gyro. | |
enum | MblMwGyroBmi160Range { MBL_MW_GYRO_BMI160_RANGE_2000dps = 0, MBL_MW_GYRO_BMI160_RANGE_1000dps, MBL_MW_GYRO_BMI160_RANGE_500dps, MBL_MW_GYRO_BMI160_RANGE_250dps, MBL_MW_GYRO_BMI160_RANGE_125dps } |
Available degrees per second ranges on the BMI160 gyro. More... | |
Variables | |
const uint8_t | MBL_MW_GYRO_ROTATION_X_AXIS_INDEX = 0 |
Indices for component values of the rotation data signal, used with mbl_mw_datasignal_get_component. | |
const uint8_t | MBL_MW_GYRO_ROTATION_Y_AXIS_INDEX = 1 |
Indices for component values of the rotation data signal, used with mbl_mw_datasignal_get_component. | |
const uint8_t | MBL_MW_GYRO_ROTATION_Z_AXIS_INDEX = 2 |
Indices for component values of the rotation data signal, used with mbl_mw_datasignal_get_component. | |
Functions for interacting with the BMI160 gyro.
This sensor is only available on MetaWear RG and RPro boards.
enum MblMwGyroBmi160Range |
Available degrees per second ranges on the BMI160 gyro.
METAWEAR_API void mbl_mw_gyro_bmi160_disable_rotation_sampling | ( | const MblMwMetaWearBoard * | board | ) |
Disables rotation sampling.
board | Pointer to the board to send the command to |
METAWEAR_API void mbl_mw_gyro_bmi160_enable_rotation_sampling | ( | const MblMwMetaWearBoard * | board | ) |
Enables rotation sampling.
board | Pointer to the board to send the command to |
METAWEAR_API MblMwDataSignal* mbl_mw_gyro_bmi160_get_high_freq_rotation_data_signal | ( | const MblMwMetaWearBoard * | board | ) |
Use mbl_mw_gyro_bmi160_get_packed_rotation_data_signal instead.
METAWEAR_API MblMwDataSignal* mbl_mw_gyro_bmi160_get_packed_rotation_data_signal | ( | const MblMwMetaWearBoard * | board | ) |
Variant of rotation data that packs multiple data samples into 1 BLE packet to increase the data throughput.
This data signal cannot be used with data processing or logging, only with streaming.
METAWEAR_API MblMwDataSignal* mbl_mw_gyro_bmi160_get_rotation_data_signal | ( | const MblMwMetaWearBoard * | board | ) |
Retrieves the data signal representing BMI160 rotation data.
board | Pointer to the board to retrieve the signal from |
METAWEAR_API void mbl_mw_gyro_bmi160_read_config | ( | const MblMwMetaWearBoard * | board, |
void * | context, | ||
MblMwFnBoardPtrInt | completed | ||
) |
Pulls the current gyro output data rate and data range from the sensor.
board | Calling object |
context | Pointer to additional data for the callback function |
completed | Callback function that is executed when the task is finished |
METAWEAR_API void mbl_mw_gyro_bmi160_set_odr | ( | MblMwMetaWearBoard * | board, |
MblMwGyroBmi160Odr | odr | ||
) |
Sets the output data rate.
board | Pointer to the board to modify |
odr | Output data rate value to assign |
METAWEAR_API void mbl_mw_gyro_bmi160_set_range | ( | MblMwMetaWearBoard * | board, |
MblMwGyroBmi160Range | range | ||
) |
Sets the rotation range.
board | Pointer to the board to modify |
range | New rotation range |
METAWEAR_API void mbl_mw_gyro_bmi160_start | ( | const MblMwMetaWearBoard * | board | ) |
Switches the gyro to active mode.
While in active mode, the gyro cannot be configured
METAWEAR_API void mbl_mw_gyro_bmi160_write_config | ( | const MblMwMetaWearBoard * | board | ) |
Writes the configuration to the sendor.
board | Pointer to the board to send the command to |