|
MetaWear C++ API
0.18.0
C++ implementation of the MetaWear protocol
|
Communicates with the BMM150 magnetometer. More...
#include "sensor_common.h"Go to the source code of this file.
Enumerations | |
| enum | MblMwMagBmm150Preset { MBL_MW_MAG_BMM150_PRESET_LOW_POWER = 0, MBL_MW_MAG_BMM150_PRESET_REGULAR, MBL_MW_MAG_BMM150_PRESET_ENHANCED_REGULAR, MBL_MW_MAG_BMM150_PRESET_HIGH_ACCURACY } |
| Preset power modes recommended by Bosch. More... | |
| enum | MblMwMagBmm150Odr { MBL_MW_MAG_BMM150_ODR_10Hz = 0, MBL_MW_MAG_BMM150_ODR_2Hz, MBL_MW_MAG_BMM150_ODR_6Hz, MBL_MW_MAG_BMM150_ODR_8Hz, MBL_MW_MAG_BMM150_ODR_15Hz, MBL_MW_MAG_BMM150_ODR_20Hz, MBL_MW_MAG_BMM150_ODR_25Hz, MBL_MW_MAG_BMM150_ODR_30Hz } |
| Available output data rates for the BMM150 magnetometer. | |
Functions | |
| METAWEAR_API MblMwDataSignal * | mbl_mw_mag_bmm150_get_b_field_data_signal (const MblMwMetaWearBoard *board) |
| Retrieves the data signal representing B field strength. More... | |
| METAWEAR_API MblMwDataSignal * | mbl_mw_mag_bmm150_get_packed_b_field_data_signal (const MblMwMetaWearBoard *board) |
| Variant of B field data that packs multiple data samples into 1 BLE packet to increase the data throughput. More... | |
| METAWEAR_API void | mbl_mw_mag_bmm150_configure (const MblMwMetaWearBoard *board, uint16_t xy_reps, uint16_t z_reps, MblMwMagBmm150Odr odr) |
| Manually configure the sensor, only for advanced users. More... | |
| METAWEAR_API void | mbl_mw_mag_bmm150_set_preset (const MblMwMetaWearBoard *board, MblMwMagBmm150Preset preset) |
| Sets the power mode to one of the recommended presets. More... | |
| METAWEAR_API void | mbl_mw_mag_bmm150_enable_b_field_sampling (const MblMwMetaWearBoard *board) |
| Enable B field sampling. More... | |
| METAWEAR_API void | mbl_mw_mag_bmm150_disable_b_field_sampling (const MblMwMetaWearBoard *board) |
| Disable B field sampling. More... | |
| METAWEAR_API void | mbl_mw_mag_bmm150_start (const MblMwMetaWearBoard *board) |
| Switches the magnetometer into normal mode. More... | |
| METAWEAR_API void | mbl_mw_mag_bmm150_stop (const MblMwMetaWearBoard *board) |
| Switches the magnetometer into sleep mode. More... | |
| METAWEAR_API void | mbl_mw_mag_bmm150_suspend (const MblMwMetaWearBoard *board) |
| Puts the magnetometer in suspend mode. More... | |
Variables | |
| const uint8_t | MBL_MW_MAG_BFIELD_X_AXIS_INDEX = 0 |
| Indices for component values of the bfield data signal, used with mbl_mw_datasignal_get_component. | |
| const uint8_t | MBL_MW_MAG_BFIELD_Y_AXIS_INDEX = 1 |
| Indices for component values of the bfield data signal, used with mbl_mw_datasignal_get_component. | |
| const uint8_t | MBL_MW_MAG_BFIELD_Z_AXIS_INDEX = 2 |
| Indices for component values of the bfield data signal, used with mbl_mw_datasignal_get_component. | |
Communicates with the BMM150 magnetometer.
| enum MblMwMagBmm150Preset |
Preset power modes recommended by Bosch.
| Setting | ODR | Average Current | Noise |
|---|---|---|---|
| LOW_POWER | 10Hz | 170μA | 1.0μT (xy axis), 1.4μT (z axis) |
| REGULAR | 10Hz | 0.5mA | 0.6μT |
| ENHANCED_REGULAR | 10Hz | 0.8mA | 0.5μT |
| HIGH_ACCURACY | 20Hz | 4.9mA | 0.3μT |
| METAWEAR_API void mbl_mw_mag_bmm150_configure | ( | const MblMwMetaWearBoard * | board, |
| uint16_t | xy_reps, | ||
| uint16_t | z_reps, | ||
| MblMwMagBmm150Odr | odr | ||
| ) |
Manually configure the sensor, only for advanced users.
It is recommended that users use one of the preset configurations.
| board | Calling object |
| xy_reps | Repetitions on the x/y-axis |
| z_reps | Repetitions on the z-axis |
| odr | Sensor data rate |
| METAWEAR_API void mbl_mw_mag_bmm150_disable_b_field_sampling | ( | const MblMwMetaWearBoard * | board | ) |
Disable B field sampling.
| board | Calling object |
| METAWEAR_API void mbl_mw_mag_bmm150_enable_b_field_sampling | ( | const MblMwMetaWearBoard * | board | ) |
Enable B field sampling.
| board | Calling object |
| METAWEAR_API MblMwDataSignal* mbl_mw_mag_bmm150_get_b_field_data_signal | ( | const MblMwMetaWearBoard * | board | ) |
Retrieves the data signal representing B field strength.
| board | Calling object |
| METAWEAR_API MblMwDataSignal* mbl_mw_mag_bmm150_get_packed_b_field_data_signal | ( | const MblMwMetaWearBoard * | board | ) |
Variant of B field 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.
| board | Calling object |
| METAWEAR_API void mbl_mw_mag_bmm150_set_preset | ( | const MblMwMetaWearBoard * | board, |
| MblMwMagBmm150Preset | preset | ||
| ) |
Sets the power mode to one of the recommended presets.
| board | Calling object |
| preset | New preset power mode to use |
| METAWEAR_API void mbl_mw_mag_bmm150_start | ( | const MblMwMetaWearBoard * | board | ) |
Switches the magnetometer into normal mode.
| board | Calling object |
| METAWEAR_API void mbl_mw_mag_bmm150_stop | ( | const MblMwMetaWearBoard * | board | ) |
Switches the magnetometer into sleep mode.
| board | Calling object |
| METAWEAR_API void mbl_mw_mag_bmm150_suspend | ( | const MblMwMetaWearBoard * | board | ) |
Puts the magnetometer in suspend mode.
This function will not issuee the command unless the board is running minimum firmware v1.3.4.
| board | Calling object |
1.8.14