|
MetaWear C++ API
0.13.4
C++ implementation of the MetaWear protocol
|
Interacts with the supported Bosch accelerometers, currenly BMI160 and BMA255. More...
#include "sensor_common.h"Go to the source code of this file.
Classes | |
| struct | MblMwBoschAnyMotion |
| Wrapper class encapsulating responses from any motion detection. More... | |
Enumerations | |
| enum | MblMwAccBoschRange { MBL_MW_ACC_BOSCH_RANGE_2G = 0, MBL_MW_ACC_BOSCH_RANGE_4G, MBL_MW_ACC_BOSCH_RANGE_8G, MBL_MW_ACC_BOSCH_RANGE_16G } |
| Available g-ranges on the Bosch accelerometers. More... | |
| enum | MblMwAccBmi160Odr { MBL_MW_ACC_BMI160_ODR_0_78125Hz = 0, MBL_MW_ACC_BMI160_ODR_1_5625Hz, MBL_MW_ACC_BMI160_ODR_3_125Hz, MBL_MW_ACC_BMI160_ODR_6_25Hz, MBL_MW_ACC_BMI160_ODR_12_5Hz, MBL_MW_ACC_BMI160_ODR_25Hz, MBL_MW_ACC_BMI160_ODR_50Hz, MBL_MW_ACC_BMI160_ODR_100Hz, MBL_MW_ACC_BMI160_ODR_200Hz, MBL_MW_ACC_BMI160_ODR_400Hz, MBL_MW_ACC_BMI160_ODR_800Hz, MBL_MW_ACC_BMI160_ODR_1600Hz } |
| Available ouput data rates on the BMI160 accelerometer. | |
| enum | MblMwAccBma255Odr { MBL_MW_ACC_BMA255_ODR_15_62Hz = 0, MBL_MW_ACC_BMA255_ODR_31_26Hz, MBL_MW_ACC_BMA255_ODR_62_5Hz, MBL_MW_ACC_BMA255_ODR_125Hz, MBL_MW_ACC_BMA255_ODR_250Hz, MBL_MW_ACC_BMA255_ODR_500Hz, MBL_MW_ACC_BMA255_ODR_1000Hz, MBL_MW_ACC_BMA255_ODR_2000Hz } |
| Available ouput data rates on the BMA255 accelerometer. | |
| enum | MblMwAccBmi160StepCounterMode { MBL_MW_ACC_BMI160_STEP_COUNTER_MODE_NORMAL = 0, MBL_MW_ACC_BMI160_STEP_COUNTER_MODE_SENSITIVE, MBL_MW_ACC_BMI160_STEP_COUNTER_MODE_ROBUST } |
| Operation modes for the step counter algorithm. More... | |
| enum | MblMwAccBoschOrientationMode { MBL_MW_ACC_BOSCH_ORIENTATION_MODE_SYMMETRICAL, MBL_MW_ACC_BOSCH_ORIENTATION_MODE_HIGH_ASYMMETRICAL, MBL_MW_ACC_BOSCH_ORIENTATION_MODE_LOW_ASYMMETRICAL } |
| Calculation modes controlling the conditions that determine the sensor's orientation. More... | |
Variables | |
| const uint8_t | MBL_MW_MODULE_ACC_TYPE_BMI160 = 1 |
| Constant identifying the BMI160 accelerometer module type. | |
| const uint8_t | MBL_MW_MODULE_ACC_TYPE_BMA255 = 3 |
| Constant identifying the BMA255 accelerometer module type. | |
Interacts with the supported Bosch accelerometers, currenly BMI160 and BMA255.
The BMI160 and BMA255 sensors are identical except for the output data rates. Functions that are generic for both accelerometers have "bosch" in the name whereas functions specific to either accelerometer are contain their model i.e. "bmi160" or "bma255".
Operation modes for the step counter algorithm.
| enum MblMwAccBoschRange |
| METAWEAR_API void mbl_mw_acc_bma255_set_odr | ( | MblMwMetaWearBoard * | board, |
| MblMwAccBma255Odr | odr | ||
| ) |
Sets the output data rate for the BMA255 accelerometer.
| board | Pointer to the board to modify |
| odr | Output data rate value to assign |
| METAWEAR_API void mbl_mw_acc_bmi160_disable_step_counter | ( | MblMwMetaWearBoard * | board | ) |
Disables the BMI160 step counter.
| board | Board to modify |
| METAWEAR_API void mbl_mw_acc_bmi160_disable_step_detector | ( | const MblMwMetaWearBoard * | board | ) |
Disables the BMI160 step detector.
| board | Pointer to the board to send the command to |
| METAWEAR_API void mbl_mw_acc_bmi160_enable_step_counter | ( | MblMwMetaWearBoard * | board | ) |
Enables the BMI160 step counter.
| board | Board to modify |
| METAWEAR_API void mbl_mw_acc_bmi160_enable_step_detector | ( | const MblMwMetaWearBoard * | board | ) |
Enables the BMI160 step detector.
| board | Pointer to the board to send the command to |
| METAWEAR_API MblMwDataSignal* mbl_mw_acc_bmi160_get_step_counter_data_signal | ( | const MblMwMetaWearBoard * | board | ) |
Retrieves the data signal representing data from the BMI160 step counter.
| board | Pointer to the board to retrieve the signal from |
| METAWEAR_API MblMwDataSignal* mbl_mw_acc_bmi160_get_step_detector_data_signal | ( | const MblMwMetaWearBoard * | board | ) |
Retrieves the data signal representing data from the BMI160 step detector.
| board | Pointer to the board to retrieve the signal from |
| METAWEAR_API void mbl_mw_acc_bmi160_reset_step_counter | ( | const MblMwMetaWearBoard * | board | ) |
Resets the BMI160 step counter.
| board | Board to reset |
| METAWEAR_API void mbl_mw_acc_bmi160_set_odr | ( | MblMwMetaWearBoard * | board, |
| MblMwAccBmi160Odr | odr | ||
| ) |
Sets the output data rate for the BMI160 accelerometer.
| board | Pointer to the board to modify |
| odr | Output data rate value to assign |
| METAWEAR_API void mbl_mw_acc_bmi160_set_step_counter_mode | ( | MblMwMetaWearBoard * | board, |
| MblMwAccBmi160StepCounterMode | mode | ||
| ) |
Sets the operational mode of the step counter.
| board | Board to modify |
| mode | New operation mode |
| METAWEAR_API void mbl_mw_acc_bmi160_write_step_counter_config | ( | const MblMwMetaWearBoard * | board | ) |
Writes the step counter configuration to the sensor.
| board | Board to write to |
| METAWEAR_API void mbl_mw_acc_bosch_disable_acceleration_sampling | ( | const MblMwMetaWearBoard * | board | ) |
Disables acceleration sampling.
| board | Pointer to the board to send the command to |
| METAWEAR_API void mbl_mw_acc_bosch_disable_motion_detection | ( | const MblMwMetaWearBoard * | board | ) |
Disables motion detection.
| board | Calling object |
| METAWEAR_API void mbl_mw_acc_bosch_disable_orientation_detection | ( | const MblMwMetaWearBoard * | board | ) |
Disables orientation detection.
| board | Calling object |
| METAWEAR_API void mbl_mw_acc_bosch_enable_acceleration_sampling | ( | const MblMwMetaWearBoard * | board | ) |
Enables acceleration sampling.
| board | Pointer to the board to send the command to |
| METAWEAR_API void mbl_mw_acc_bosch_enable_motion_detection | ( | const MblMwMetaWearBoard * | board | ) |
Enables motion detection.
| board | Calling object |
| METAWEAR_API void mbl_mw_acc_bosch_enable_orientation_detection | ( | const MblMwMetaWearBoard * | board | ) |
Enables orientation detection.
| board | Calling object |
| METAWEAR_API MblMwDataSignal* mbl_mw_acc_bosch_get_acceleration_data_signal | ( | const MblMwMetaWearBoard * | board | ) |
Retrieves the data signal representing acceleration data from a Bosch accelerometer.
| board | Pointer to the board to retrieve the signal from |
| METAWEAR_API MblMwDataSignal* mbl_mw_acc_bosch_get_high_freq_acceleration_data_signal | ( | const MblMwMetaWearBoard * | board | ) |
Use mbl_mw_acc_bosch_get_packed_acceleration_data_signal instead.
| METAWEAR_API MblMwDataSignal* mbl_mw_acc_bosch_get_motion_data_signal | ( | const MblMwMetaWearBoard * | board | ) |
Retrieves the data signal representing data from the motion detection algorithm.
| board | Calling object |
| METAWEAR_API MblMwDataSignal* mbl_mw_acc_bosch_get_orientation_detection_data_signal | ( | const MblMwMetaWearBoard * | board | ) |
Retrieves the data signal representing data from the orientation detection algorithm.
| board | Calling object |
| METAWEAR_API MblMwDataSignal* mbl_mw_acc_bosch_get_packed_acceleration_data_signal | ( | const MblMwMetaWearBoard * | board | ) |
Variant of acceleration 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 void mbl_mw_acc_bosch_set_any_motion_count | ( | MblMwMetaWearBoard * | board, |
| uint8_t | count | ||
| ) |
Sets the any motion detector's count parameter.
| board | Calling object |
| count | Number of consecutive slope data points that must be above the threshold |
| METAWEAR_API void mbl_mw_acc_bosch_set_any_motion_threshold | ( | MblMwMetaWearBoard * | board, |
| float | threshold | ||
| ) |
Sets the any motion detector's threshold parameter.
| board | Calling object |
| count | Value that the slope data points must be above |
| METAWEAR_API void mbl_mw_acc_bosch_set_orientation_hysteresis | ( | MblMwMetaWearBoard * | board, |
| float | hysteresis | ||
| ) |
Set the hysteresis offset for portrait/landscape detection.
| board | Calling object |
| hysteresis | New calculation mode |
| METAWEAR_API void mbl_mw_acc_bosch_set_orientation_mode | ( | MblMwMetaWearBoard * | board, |
| MblMwAccBoschOrientationMode | mode | ||
| ) |
Set the orientation calculation mode.
| board | Calling object |
| mode | New calculation mode |
| METAWEAR_API void mbl_mw_acc_bosch_set_range | ( | MblMwMetaWearBoard * | board, |
| MblMwAccBoschRange | range | ||
| ) |
Sets the acceleration range.
| board | Pointer to the board to modify |
| range | Acceleration range to assign |
| METAWEAR_API void mbl_mw_acc_bosch_start | ( | const MblMwMetaWearBoard * | board | ) |
Switches the accelerometer to active mode.
When in active mode, the accelerometer cannot be configured
| board | Pointer to the board to send the command to |
| METAWEAR_API void mbl_mw_acc_bosch_stop | ( | const MblMwMetaWearBoard * | board | ) |
Switches the accelerometer to standby mode.
| board | Pointer to the board to send the command to |
| METAWEAR_API void mbl_mw_acc_bosch_write_acceleration_config | ( | const MblMwMetaWearBoard * | board | ) |
Writes the acceleration settings to the sensor.
| board | Pointer to the board to send the command to |
| METAWEAR_API void mbl_mw_acc_bosch_write_motion_config | ( | const MblMwMetaWearBoard * | board | ) |
Writes the motion configuration to the remote device.
| board | Calling object |
| METAWEAR_API void mbl_mw_acc_bosch_write_orientation_config | ( | const MblMwMetaWearBoard * | board | ) |
Writes the orientation detection settings to the board.
| board | Calling object |
1.8.14