MetaWear C++ API  0.20.0
C++ implementation of the MetaWear protocol
accelerometer_bosch.h
Go to the documentation of this file.
1 
9 #pragma once
10 
11 #include "sensor_common.h"
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 const uint8_t MBL_MW_MODULE_ACC_TYPE_BMI160 = 1;
18 const uint8_t MBL_MW_MODULE_ACC_TYPE_BMA255 = 3;
19 const uint8_t MBL_MW_MODULE_ACC_TYPE_BMI270 = 4;
20 
24 typedef enum {
25  MBL_MW_ACC_BOSCH_TYPEWRIST_NONE= 0,
26  MBL_MW_ACC_BOSCH_TYPEWRIST_WEARK_WAKEUP,
27  MBL_MW_ACC_BOSCH_TYPEWRIST_GESTURE,
29 
33 typedef enum {
34  MBL_MW_ACC_BOSCH_ACTIVITY_STILL= 0,
35  MBL_MW_ACC_BOSCH_ACTIVITY_WALKING,
36  MBL_MW_ACC_BOSCH_ACTIVITY_RUNNING,
37  MBL_MW_ACC_BOSCH_ACTIVITY_UNKNOWN
39 
43 typedef enum {
51 
55 typedef enum {
60 
64 typedef enum {
70 
74 typedef enum {
75  MBL_MW_ACC_BMI160_ODR_0_78125Hz= 0,
76  MBL_MW_ACC_BMI160_ODR_1_5625Hz,
77  MBL_MW_ACC_BMI160_ODR_3_125Hz,
78  MBL_MW_ACC_BMI160_ODR_6_25Hz,
79  MBL_MW_ACC_BMI160_ODR_12_5Hz,
80  MBL_MW_ACC_BMI160_ODR_25Hz,
81  MBL_MW_ACC_BMI160_ODR_50Hz,
82  MBL_MW_ACC_BMI160_ODR_100Hz,
83  MBL_MW_ACC_BMI160_ODR_200Hz,
84  MBL_MW_ACC_BMI160_ODR_400Hz,
85  MBL_MW_ACC_BMI160_ODR_800Hz,
86  MBL_MW_ACC_BMI160_ODR_1600Hz
88 
92 typedef enum {
93  MBL_MW_ACC_BMA255_ODR_15_62Hz= 0,
94  MBL_MW_ACC_BMA255_ODR_31_26Hz,
95  MBL_MW_ACC_BMA255_ODR_62_5Hz,
96  MBL_MW_ACC_BMA255_ODR_125Hz,
97  MBL_MW_ACC_BMA255_ODR_250Hz,
98  MBL_MW_ACC_BMA255_ODR_500Hz,
99  MBL_MW_ACC_BMA255_ODR_1000Hz,
100  MBL_MW_ACC_BMA255_ODR_2000Hz
102 
106 typedef enum {
107  MBL_MW_ACC_BMI270_ODR_0_78125Hz= 0,
108  MBL_MW_ACC_BMI270_ODR_1_5625Hz,
109  MBL_MW_ACC_BMI270_ODR_3_125Hz,
110  MBL_MW_ACC_BMI270_ODR_6_25Hz,
111  MBL_MW_ACC_BMI270_ODR_12_5Hz,
112  MBL_MW_ACC_BMI270_ODR_25Hz,
113  MBL_MW_ACC_BMI270_ODR_50Hz,
114  MBL_MW_ACC_BMI270_ODR_100Hz,
115  MBL_MW_ACC_BMI270_ODR_200Hz,
116  MBL_MW_ACC_BMI270_ODR_400Hz,
117  MBL_MW_ACC_BMI270_ODR_800Hz,
118  MBL_MW_ACC_BMI270_ODR_1600Hz
120 
124 typedef enum {
132 
137 typedef enum {
140  MBL_MW_ACC_BOSCH_ORIENTATION_MODE_HIGH_ASYMMETRICAL,
141  MBL_MW_ACC_BOSCH_ORIENTATION_MODE_LOW_ASYMMETRICAL
143 
148 typedef enum {
149  MBL_MW_ACC_BOSCH_TAP_QUIET_TIME_30ms= 0,
150  MBL_MW_ACC_BOSCH_TAP_QUIET_TIME_20ms
156 typedef enum {
157  MBL_MW_ACC_BOSCH_TAP_SHOCK_TIME_50ms= 0,
158  MBL_MW_ACC_BOSCH_TAP_SHOCK_TIME_75ms
163 typedef enum {
164  MBL_MW_ACC_BOSCH_DOUBLE_TAP_WINDOW_50ms= 0,
165  MBL_MW_ACC_BOSCH_DOUBLE_TAP_WINDOW_100ms,
166  MBL_MW_ACC_BOSCH_DOUBLE_TAP_WINDOW_150ms,
167  MBL_MW_ACC_BOSCH_DOUBLE_TAP_WINDOW_200ms,
168  MBL_MW_ACC_BOSCH_DOUBLE_TAP_WINDOW_250ms,
169  MBL_MW_ACC_BOSCH_DOUBLE_TAP_WINDOW_375ms,
170  MBL_MW_ACC_BOSCH_DOUBLE_TAP_WINDOW_500ms,
171  MBL_MW_ACC_BOSCH_DOUBLE_TAP_WINDOW_700ms
173 
177 typedef enum {
178  MBL_MW_ACC_BOSCH_AXIS_XYZ_REMAP_XYZ= 0,
179  MBL_MW_ACC_BOSCH_AXIS_XYZ_REMAP_YZX,
180  MBL_MW_ACC_BOSCH_AXIS_XYZ_REMAP_ZXY,
181  MBL_MW_ACC_BOSCH_AXIS_XYZ_REMAP_XZY,
182  MBL_MW_ACC_BOSCH_AXIS_XYZ_REMAP_YXZ,
183  MBL_MW_ACC_BOSCH_AXIS_XYZ_REMAP_ZYX
185 
189 typedef enum {
190  MBL_MW_ACC_BOSCH_AXIS_XYZ_SIGN_000= 0,
191  MBL_MW_ACC_BOSCH_AXIS_XYZ_SIGN_100,
192  MBL_MW_ACC_BOSCH_AXIS_XYZ_SIGN_110,
193  MBL_MW_ACC_BOSCH_AXIS_XYZ_SIGN_101,
194  MBL_MW_ACC_BOSCH_AXIS_XYZ_SIGN_010,
195  MBL_MW_ACC_BOSCH_AXIS_XYZ_SIGN_011,
196  MBL_MW_ACC_BOSCH_AXIS_XYZ_SIGN_001,
197  MBL_MW_ACC_BOSCH_AXIS_XYZ_SIGN_111
199 
203 typedef struct {
204  uint8_t sign;
205  uint8_t x_axis_active;
206  uint8_t y_axis_active;
207  uint8_t z_axis_active;
209 
213 typedef struct {
214  uint8_t type;
215  uint8_t gesture_code;
217 
578 METAWEAR_API void mbl_mw_acc_bmi270_fifo_downs(const MblMwMetaWearBoard* board, uint8_t gyro_downs, uint8_t gyro_data, uint8_t acc_downs, uint8_t acc_data);
588 METAWEAR_API void mbl_mw_acc_bmi270_acc_offsets(const MblMwMetaWearBoard* board, uint16_t x_offset, uint16_t y_offset, uint16_t z_offset);
689 METAWEAR_API void mbl_mw_acc_bosch_enable_tap_detection(const MblMwMetaWearBoard *board, uint8_t enable_single, uint8_t enable_double);
782 
783 #ifdef __cplusplus
784 }
785 #endif
MblMwAccBoschTypewrist
Available wrist gestures on the BMI270.
Definition: accelerometer_bosch.h:24
METAWEAR_API void mbl_mw_acc_bmi270_reset_step_counter(const MblMwMetaWearBoard *board)
Resets the BMI270 step counter (step counter = 0) Does not disable the step counter.
METAWEAR_API void mbl_mw_acc_bosch_set_no_motion_count(MblMwMetaWearBoard *board, uint8_t count)
Sets the no motion detector's count parameter.
METAWEAR_API void mbl_mw_acc_bmi270_disable_step_detector(const MblMwMetaWearBoard *board)
Disables the BMI270 step detector.
METAWEAR_API void mbl_mw_acc_bmi270_wrist_wakeup_tilt_pd(const MblMwMetaWearBoard *board, uint16_t angle)
Sets the Sine of the maximum allowed backward tilt angle in portrait down direction of the device,...
METAWEAR_API void mbl_mw_acc_bmi270_write_wrist_gesture_config(const MblMwMetaWearBoard *board)
Writes the wrist gesture recognition configuration to the sensor Applies the ARM SIDE,...
METAWEAR_API void mbl_mw_acc_bosch_set_double_tap_window(MblMwMetaWearBoard *board, MblMwAccBoschDoubleTapWindow window)
Sets the tap detector's double tap window The time window between two taps is between 12....
METAWEAR_API void mbl_mw_acc_bmi160_set_step_counter_mode(MblMwMetaWearBoard *board, MblMwAccBmi160StepCounterMode mode)
Sets the operational mode of the step counter.
METAWEAR_API void mbl_mw_acc_bosch_write_acceleration_config(const MblMwMetaWearBoard *board)
Writes the acceleration settings to the sensor Applies the ODR and RANGE values set in set_range() an...
METAWEAR_API MblMwDataSignal * mbl_mw_acc_bosch_get_high_freq_acceleration_data_signal(const MblMwMetaWearBoard *board)
METAWEAR_API void mbl_mw_acc_bosch_set_no_motion_threshold(MblMwMetaWearBoard *board, float threshold)
Sets the no motion detector's threshold parameter.
METAWEAR_API MblMwDataSignal * mbl_mw_acc_bmi270_get_step_detector_data_signal(const MblMwMetaWearBoard *board)
Retrieves the data signal representing data from the BMI270 step detector This signal simply detects ...
METAWEAR_API void mbl_mw_acc_bmi160_set_odr(MblMwMetaWearBoard *board, MblMwAccBmi160Odr odr)
Sets the output data rate for the BMI160 accelerometer The ODR sets the output data frequency in Hz.
METAWEAR_API void mbl_mw_acc_bosch_enable_motion_detection(const MblMwMetaWearBoard *board, MblMwAccBoschMotion type)
Enables motion detection The signal will callback if any motion is sensed based on the motion config ...
METAWEAR_API void mbl_mw_acc_bosch_set_shock_time(MblMwMetaWearBoard *board, MblMwAccBoschTapShockTime time)
Sets the tap detector's shock time parameter Selects a tap shock duration of ‘0’->50ms,...
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 This signal is ti...
METAWEAR_API void mbl_mw_acc_bmi270_wrist_wakeup_tilt_pu(const MblMwMetaWearBoard *board, uint16_t angle)
Sets the Sine of the maximum allowed forward tilt angle in portrait up direction of the device,...
METAWEAR_API void mbl_mw_acc_bmi270_disable_activity_detection(const MblMwMetaWearBoard *board)
Disables the BMI270 activity detector.
METAWEAR_API void mbl_mw_acc_bosch_set_any_motion_count(MblMwMetaWearBoard *board, uint8_t count)
Sets the any motion detector's count parameter Any-motion generates an interrupt when the absolute va...
METAWEAR_API void mbl_mw_acc_bosch_disable_tap_detection(const MblMwMetaWearBoard *board)
Disable the tap detector Not supported by the BMI270.
const uint8_t MBL_MW_MODULE_ACC_TYPE_BMI270
Constant identifying the BMI270 accelerometer module type.
Definition: accelerometer_bosch.h:19
MblMwAccBoschOrientationMode
Calculation modes controlling the conditions that determine the sensor's orientation.
Definition: accelerometer_bosch.h:137
@ MBL_MW_ACC_BOSCH_ORIENTATION_MODE_SYMMETRICAL
Default mode.
Definition: accelerometer_bosch.h:139
METAWEAR_API void mbl_mw_acc_bmi270_wrist_gesture_samples(const MblMwMetaWearBoard *board, uint16_t samples)
Value of minimum time difference between wrist roll-out and roll-in movement during flick gesture.
METAWEAR_API void mbl_mw_acc_bosch_set_range(MblMwMetaWearBoard *board, MblMwAccBoschRange range)
Sets the acceleration range The range is in units of Gs between 2 and 16gs for Bosch sensors See MblM...
METAWEAR_API void mbl_mw_acc_bmi160_reset_step_counter(const MblMwMetaWearBoard *board)
Resets the BMI160 step counter (step counter = 0) Does not disable the step counter.
METAWEAR_API void mbl_mw_acc_bmi270_enable_activity_detection(const MblMwMetaWearBoard *board)
Enables the BMI270 activity detector A callback will notify the user when an activity is detected (wa...
MblMwAccBoschTapQuietTime
Available quiet times for tap detection.
Definition: accelerometer_bosch.h:148
METAWEAR_API void mbl_mw_acc_bmi160_enable_step_detector(const MblMwMetaWearBoard *board)
Enables the BMI160 step detector A callback will notify the user when a step is detected but will NOT...
METAWEAR_API void mbl_mw_acc_bmi270_wrist_gesture_duration(const MblMwMetaWearBoard *board, uint16_t duration)
Sets the maximum time for the gesture recognition Maximum time within which gesture movement has to b...
MblMwAccBoschRange
Available g-ranges on the Bosch accelerometers.
Definition: accelerometer_bosch.h:64
@ MBL_MW_ACC_BOSCH_RANGE_4G
+/- 4g
Definition: accelerometer_bosch.h:66
@ MBL_MW_ACC_BOSCH_RANGE_16G
+/- 16g
Definition: accelerometer_bosch.h:68
@ MBL_MW_ACC_BOSCH_RANGE_8G
+/- 8g
Definition: accelerometer_bosch.h:67
@ MBL_MW_ACC_BOSCH_RANGE_2G
+/- 2g
Definition: accelerometer_bosch.h:65
METAWEAR_API void mbl_mw_acc_bmi270_read_step_counter(MblMwMetaWearBoard *board, void *context, MblMwFnBoardPtrInt handler)
Reads the current step count.
METAWEAR_API void mbl_mw_acc_bmi270_enable_step_counter(const MblMwMetaWearBoard *board)
Enables the BMI270 step counter The trigger count will trigger the callback signal with the # of step...
METAWEAR_API void mbl_mw_acc_bosch_stop(const MblMwMetaWearBoard *board)
Switches the accelerometer to standby mode (low power state)
METAWEAR_API void mbl_mw_acc_bosch_enable_tap_detection(const MblMwMetaWearBoard *board, uint8_t enable_single, uint8_t enable_double)
Enables the tap detector Not supported by the BMI270.
METAWEAR_API void mbl_mw_acc_bosch_enable_orientation_detection(const MblMwMetaWearBoard *board)
Enables orientation detection Not supported by the BMI270.
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 This signal is i...
MblMwAccBoschTapShockTime
Available shock times for tap detection.
Definition: accelerometer_bosch.h:156
MblMwAccBoschAxisXyzSign
Available windows for double tap detection.
Definition: accelerometer_bosch.h:189
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...
METAWEAR_API void mbl_mw_acc_bmi270_wrist_wakeup_tilt_ll(const MblMwMetaWearBoard *board, uint16_t angle)
Sets the Sine of the maximum allowed downward tilt angle in landscape left direction of the device,...
METAWEAR_API void mbl_mw_acc_bma255_set_odr(MblMwMetaWearBoard *board, MblMwAccBma255Odr odr)
Sets the output data rate for the BMI160 accelerometer The ODR sets the output data frequency in Hz.
MblMwAccBmi160Odr
Available ouput data rates on the BMI160 accelerometer.
Definition: accelerometer_bosch.h:74
METAWEAR_API void mbl_mw_acc_bmi160_disable_step_detector(const MblMwMetaWearBoard *board)
Disables the BMI160 step detector.
MblMwAccBoschDoubleTapWindow
Available windows for double tap detection.
Definition: accelerometer_bosch.h:163
const uint8_t MBL_MW_MODULE_ACC_TYPE_BMI160
Constant identifying the BMI160 accelerometer module type.
Definition: accelerometer_bosch.h:17
METAWEAR_API void mbl_mw_acc_bmi270_disable_wrist_gesture(const MblMwMetaWearBoard *board)
Disables the BMI270 wrist gesture recognition.
METAWEAR_API void mbl_mw_acc_bmi270_write_wrist_wakeup_config(const MblMwMetaWearBoard *board)
Writes the wrist gesture recognition configuration to the sensor Applies the ARM SIDE,...
METAWEAR_API void mbl_mw_acc_bmi270_fifo_downs(const MblMwMetaWearBoard *board, uint8_t gyro_downs, uint8_t gyro_data, uint8_t acc_downs, uint8_t acc_data)
Downsampling for the BMI270 acc See BMI270 datasheet for more details.
MblMwAccBma255Odr
Available ouput data rates on the BMA255 accelerometer.
Definition: accelerometer_bosch.h:92
METAWEAR_API void mbl_mw_acc_bosch_set_orientation_hysteresis(MblMwMetaWearBoard *board, float hysteresis)
Set the hysteresis offset (degrees) for portrait/landscape detection Upside/downside recognition hyst...
METAWEAR_API MblMwDataSignal * mbl_mw_acc_bosch_get_tap_data_signal(const MblMwMetaWearBoard *board)
Retrieves the data signal representing data from the tap detection algorithm This signal retrieves th...
METAWEAR_API void mbl_mw_acc_bosch_set_orientation_mode(MblMwMetaWearBoard *board, MblMwAccBoschOrientationMode mode)
Set the orientation calculation mode Options include: Symmetrical, High asymmetrical,...
METAWEAR_API void mbl_mw_acc_bmi270_acc_offsets(const MblMwMetaWearBoard *board, uint16_t x_offset, uint16_t y_offset, uint16_t z_offset)
Manual compensation for the BMI270 acc The offset compensation registers have a width of 8 bit using ...
METAWEAR_API void mbl_mw_acc_bosch_set_any_motion_threshold(MblMwMetaWearBoard *board, float threshold)
Sets the any motion detector's threshold parameter Any-motion generates an interrupt when the absolut...
METAWEAR_API void mbl_mw_acc_bmi270_enable_wrist_gesture(const MblMwMetaWearBoard *board)
Enables the BMI270 wrist gesture recognition.
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 This signal simply detects ...
METAWEAR_API void mbl_mw_acc_bosch_disable_motion_detection(const MblMwMetaWearBoard *board, MblMwAccBoschMotion type)
Disables motion detection.
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 This signal retrieves...
METAWEAR_API void mbl_mw_acc_bmi270_wrist_wakeup_tilt_lr(const MblMwMetaWearBoard *board, uint16_t angle)
Sets the Sine of the maximum allowed downward tilt angle in landscape right direction of the device,...
METAWEAR_API MblMwDataSignal * mbl_mw_acc_bmi270_get_activity_detector_data_signal(const MblMwMetaWearBoard *board)
Retrieves the data signal representing data from the activity detection algorithm.
MblMwAccBoschActivity
Available activities on the BMI270.
Definition: accelerometer_bosch.h:33
METAWEAR_API void mbl_mw_acc_bosch_set_sig_motion_blocksize(MblMwMetaWearBoard *board, uint16_t blocksize)
Sets the sig motion detector's blocksize parameter.
METAWEAR_API void mbl_mw_acc_bmi270_enable_wrist_wakeup(const MblMwMetaWearBoard *board)
Enables the BMI270 wrist wakeup recognition.
METAWEAR_API void mbl_mw_acc_bmi270_wrist_gesture_peak(const MblMwMetaWearBoard *board, uint16_t peak)
Sets the tilt angle for gesture recognition Sine of the minimum tilt angle in portrait down direction...
METAWEAR_API void mbl_mw_acc_bmi270_set_odr(MblMwMetaWearBoard *board, MblMwAccBmi270Odr odr)
Sets the output data rate for the BMI160 accelerometer The ODR sets the output data frequency in Hz.
METAWEAR_API void mbl_mw_acc_bmi270_wrist_gesture_armside(const MblMwMetaWearBoard *board, uint8_t side)
Sets the arm side the MetaWear is worn on for gesture recognition Device in left (0 - false) or right...
MblMwAccBoschGesture
Available wrist gestures on the BMI270.
Definition: accelerometer_bosch.h:43
@ MBL_MW_ACC_BOSCH_GESTURE_PUSH_ARM_DOWN
Arm pushed down gesture.
Definition: accelerometer_bosch.h:45
@ MBL_MW_ACC_BOSCH_GESTURE_PIVOT_UP
Pivot up gesture.
Definition: accelerometer_bosch.h:46
@ MBL_MW_ACC_BOSCH_GESTURE_ARM_FLICK_IN
Arm flick in gesture.
Definition: accelerometer_bosch.h:48
@ MBL_MW_ACC_BOSCH_GESTURE_ARM_FLICK_OUT
Arm flick out gesture.
Definition: accelerometer_bosch.h:49
@ MBL_MW_ACC_BOSCH_GESTURE_UNKNOWN
Unknown gesture.
Definition: accelerometer_bosch.h:44
@ MBL_MW_ACC_BOSCH_GESTURE_SHAKE
Shake/jiggle gesture.
Definition: accelerometer_bosch.h:47
METAWEAR_API void mbl_mw_acc_bmi270_wrist_wakeup_angle_focus(const MblMwMetaWearBoard *board, uint16_t angle)
Sets the minimum angle change for wrist wakeup Cosine of minimum expected attitude change of the devi...
METAWEAR_API void mbl_mw_acc_bosch_disable_acceleration_sampling(const MblMwMetaWearBoard *board)
Disables acceleration sampling The board will stop gathering data from the accelerometer.
METAWEAR_API void mbl_mw_acc_bmi270_enable_step_detector(const MblMwMetaWearBoard *board)
Enables the BMI270 step detector A callback will notify the user when a step is detected but will NOT...
METAWEAR_API void mbl_mw_acc_bmi160_write_step_counter_config(const MblMwMetaWearBoard *board)
Writes the step counter configuration to the sensor Applies the MODE set by set_step_counter_mode()
METAWEAR_API void mbl_mw_acc_bosch_set_quiet_time(MblMwMetaWearBoard *board, MblMwAccBoschTapQuietTime time)
Sets the tap detector's quiet time parameter Selects a tap quiet duration of ‘0’->30 ms,...
MblMwAccBoschAxisXyzRemap
Available windows for double tap detection.
Definition: accelerometer_bosch.h:177
METAWEAR_API void mbl_mw_acc_bmi270_wrist_wakeup_angle_nonfocus(const MblMwMetaWearBoard *board, uint16_t angle)
Sets the maximum angle change for wrist wakeup Cosine of minimum expected attitude change of the devi...
METAWEAR_API void mbl_mw_acc_bosch_write_motion_config(const MblMwMetaWearBoard *board, MblMwAccBoschMotion type)
Writes the motion configuration to the remote device Applies the threshold and count parameter or blo...
METAWEAR_API void mbl_mw_acc_bmi270_disable_step_counter(const MblMwMetaWearBoard *board)
Disables the BMI270 step counter.
MblMwAccBmi270Odr
Available ouput data rates on the BMI270 accelerometer.
Definition: accelerometer_bosch.h:106
METAWEAR_API void mbl_mw_acc_bmi270_axis_remap(const MblMwMetaWearBoard *board, MblMwAccBoschAxisXyzRemap map, MblMwAccBoschAxisXyzSign sign)
Remaps the BMI270 axis If the coordinate system of the MetaWear differs from the sensor coordinate sy...
MblMwAccBmi160StepCounterMode
Operation modes for the step counter algorithm.
Definition: accelerometer_bosch.h:124
@ MBL_MW_ACC_BMI160_STEP_COUNTER_MODE_ROBUST
Gives few false positives but eventually more false negatives.
Definition: accelerometer_bosch.h:130
@ MBL_MW_ACC_BMI160_STEP_COUNTER_MODE_NORMAL
Recommended for most applications, well balanced between false positives and false negatives.
Definition: accelerometer_bosch.h:126
@ MBL_MW_ACC_BMI160_STEP_COUNTER_MODE_SENSITIVE
Recommended for light weighted persons, gives few false negatives but eventually more false positives...
Definition: accelerometer_bosch.h:128
METAWEAR_API void mbl_mw_acc_bosch_enable_acceleration_sampling(const MblMwMetaWearBoard *board)
Enables acceleration sampling The board will start gathering data from the accelerometer.
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 This signal represents the n...
METAWEAR_API void mbl_mw_acc_bmi270_disable_wrist_wakeup(const MblMwMetaWearBoard *board)
Disables the BMI270 wrist wakeup recognition.
METAWEAR_API void mbl_mw_acc_bmi160_enable_step_counter(MblMwMetaWearBoard *board)
Enables the BMI160 step counter.
METAWEAR_API MblMwDataSignal * mbl_mw_acc_bmi270_get_wrist_detector_data_signal(const MblMwMetaWearBoard *board)
Retrieves the data signal representing data from the wrist gesture algorithm.
METAWEAR_API void mbl_mw_acc_bmi270_set_step_counter_trigger(MblMwMetaWearBoard *board, uint16_t trigger)
Sets the watermark level of the step counter The Step-counter will trigger output every time this num...
MblMwAccBoschMotion
Available motion detectors on the Bosch accelerometers.
Definition: accelerometer_bosch.h:55
@ MBL_MW_ACC_BOSCH_MOTION_ANYMOTION
Any motion detector.
Definition: accelerometer_bosch.h:58
@ MBL_MW_ACC_BOSCH_MOTION_SIGMOTION
Significant motion detector.
Definition: accelerometer_bosch.h:56
@ MBL_MW_ACC_BOSCH_MOTION_NOMOTION
No motion detector.
Definition: accelerometer_bosch.h:57
const uint8_t MBL_MW_MODULE_ACC_TYPE_BMA255
Constant identifying the BMA255 accelerometer module type.
Definition: accelerometer_bosch.h:18
METAWEAR_API void mbl_mw_acc_bmi160_disable_step_counter(MblMwMetaWearBoard *board)
Disables the BMI160 step counter.
METAWEAR_API void mbl_mw_acc_bosch_write_tap_config(const MblMwMetaWearBoard *board)
Sets the tap detector's double tap window Applies the duration, quiet window, shock,...
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 ...
METAWEAR_API void mbl_mw_acc_bosch_disable_orientation_detection(const MblMwMetaWearBoard *board)
Disables orientation detection Not supported by the BMI270.
METAWEAR_API void mbl_mw_acc_bosch_set_threshold(MblMwMetaWearBoard *board, float threshold)
Sets the tap detector's threshold Threshold of the single/double-tap interrupt corresponding to an ac...
METAWEAR_API void mbl_mw_acc_bmi270_write_step_counter_config(const MblMwMetaWearBoard *board)
Writes the step counter configuration to the sensor Applies the TRIGGER set by set_step_counter_trigg...
METAWEAR_API MblMwDataSignal * mbl_mw_acc_bmi270_get_step_counter_data_signal(const MblMwMetaWearBoard *board)
Retrieves the data signal representing data from the BMI270 step counter This signal represents the n...
METAWEAR_API void mbl_mw_acc_bosch_write_orientation_config(const MblMwMetaWearBoard *board)
Writes the orientation detection settings to the board Applies MODE and HYSTERESIS from set_orientati...
struct MblMwDataSignal MblMwDataSignal
A event fired from the MetaWear board that also contains data.
Definition: datasignal_fwd.h:15
#define METAWEAR_API
Indicates the function should be exported to the symbol table
Definition: dllmarker.h:27
struct MblMwMetaWearBoard MblMwMetaWearBoard
Software representation of a physical MetaWear board.
Definition: metawearboard_fwd.h:17
void(* MblMwFnBoardPtrInt)(void *context, MblMwMetaWearBoard *board, int32_t value)
Definition for callback functions that accept an MblMwMetaWearBoard pointer and an int32.
Definition: metawearboard_fwd.h:26
Wrapper class encapsulating responses from any motion detection.
Definition: accelerometer_bosch.h:203
uint8_t sign
Slope sign of the triggering motion, 0 if negative, non-zero if positive.
Definition: accelerometer_bosch.h:204
uint8_t z_axis_active
Non-zero if z-axis triggered the motion interrupt.
Definition: accelerometer_bosch.h:207
uint8_t x_axis_active
Non-zero if x-axis triggered the motion interrupt.
Definition: accelerometer_bosch.h:205
uint8_t y_axis_active
Non-zero if y-axis triggered the motion interrupt.
Definition: accelerometer_bosch.h:206
Wrapper class encapsulating responses from any motion detection.
Definition: accelerometer_bosch.h:213
uint8_t gesture_code
Non-zero if x-axis triggered the motion interrupt.
Definition: accelerometer_bosch.h:215
uint8_t type
Slope sign of the triggering motion, 0 if negative, non-zero if positive.
Definition: accelerometer_bosch.h:214