Component: Magnetometer (BMM150) (Environmental)
From Flowcode Help
Jump to navigationJump to search
Author | MatrixTSL |
Version | 1.0 |
Category | Environmental |
Contents
Magnetometer (BMM150) component
A low-power, low-noise 3-axis digital geomagnetic sensor that perfectly matches the requirements of compass applications.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_Magnetometer_BMM150.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_Magnetometer_BMM150.fcfx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
Initialise
![]() |
Initialise |
Startup communications to the sensor module. Puts the device into normal operating and preset modes. Returns 1 if module found and communicating. | |
![]() |
Return |
ReadRegister
![]() |
ReadRegister |
A simple example showing a generic way to read a register using I2C. | |
![]() |
Address |
![]() |
Return |
ReadSample
![]() |
ReadSample |
Collect a sample fromt he last SampleMag operation | |
![]() |
Axis |
0=X, 1=Y, 2=Z | |
![]() |
Return |
SampleMagData
![]() |
SampleMagData |
Samples the magnetometer and processes the data ready to be read out using the read sample macro. | |
![]() |
ApplyTrim |
0=ReadRawValues, 1=ApplyCalibrationTrim | |
![]() |
Return |
SetOperatingMode
![]() |
SetOperatingMode |
Select the operating mode and power level used by the device | |
![]() |
Mode |
0=Normal, 1=Forced, 3=Sleep, 4=Suspend | |
![]() |
Return |
SetPresetMode
![]() |
SetPresetMode |
Controls the device sample rate and accuracy | |
![]() |
Mode |
0=LowPower, 1=Normal, 2=HighAccuracy, 3=Enhanced | |
![]() |
Return |
WriteRegister
![]() |
WriteRegister |
A simple example showing a generic way to write a register using I2C. | |
![]() |
Address |
![]() |
Data |
![]() |
Return |