Component: Magnetometer (BMM150) (Environmental): Difference between revisions
Appearance
Created page with "{| style="width:50%" |- | width="20%" style="color:gray;" | Author | MatrixTSL |- | width="20%" style="color:gray;" | Version | 1.0 |- | width="20%" style="color:gray;..." |
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder"" |
||
| (5 intermediate revisions by the same user not shown) | |||
| Line 32: | Line 32: | ||
===Initialise=== | ===Initialise=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Initialise''' | ||
|- | |- | ||
| colspan="2" | Startup communications to the sensor module. Puts the device into normal operating and preset modes. Returns 1 if module found and communicating. | | colspan="2" | Startup communications to the sensor module. Puts the device into normal operating and preset modes. Returns 1 if module found and communicating. | ||
| Line 46: | Line 46: | ||
===ReadRegister=== | ===ReadRegister=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ReadRegister''' | ||
|- | |- | ||
| colspan="2" | A simple example showing a generic way to read a register using I2C. | | colspan="2" | A simple example showing a generic way to read a register using I2C. | ||
| Line 65: | Line 65: | ||
===ReadSample=== | ===ReadSample=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ReadSample''' | ||
|- | |- | ||
| colspan="2" | Collect a sample fromt he last SampleMag operation | | colspan="2" | Collect a sample fromt he last SampleMag operation | ||
| Line 84: | Line 84: | ||
===SampleMagData=== | ===SampleMagData=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SampleMagData''' | ||
|- | |- | ||
| colspan="2" | Samples the magnetometer and processes the data ready to be read out using the read sample macro. | | colspan="2" | Samples the magnetometer and processes the data ready to be read out using the read sample macro. | ||
| Line 103: | Line 103: | ||
===SetOperatingMode=== | ===SetOperatingMode=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetOperatingMode''' | ||
|- | |- | ||
| colspan="2" | Select the operating mode and power level used by the device | | colspan="2" | Select the operating mode and power level used by the device | ||
| Line 122: | Line 122: | ||
===SetPresetMode=== | ===SetPresetMode=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetPresetMode''' | ||
|- | |- | ||
| colspan="2" | Controls the device sample rate and accuracy | | colspan="2" | Controls the device sample rate and accuracy | ||
| Line 141: | Line 141: | ||
===WriteRegister=== | ===WriteRegister=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''WriteRegister''' | ||
|- | |- | ||
| colspan="2" | A simple example showing a generic way to write a register using I2C. | | colspan="2" | A simple example showing a generic way to write a register using I2C. | ||
| Line 166: | Line 166: | ||
==Property reference== | ==Property reference== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Properties''' | ||
|- | |- | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | Component Properties | ||
|- | |- | ||
|- | |- | ||
| Line 186: | Line 186: | ||
| colspan="2" | Sets the default preset for the module. Can be overridden by calling the SetPresetMode component macro. | | colspan="2" | Sets the default preset for the module. Can be overridden by calling the SetPresetMode component macro. | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | I2C Properties | ||
|- | |- | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | Connections | ||
|- | |- | ||
|- | |- | ||
| Line 219: | Line 219: | ||
| colspan="2" | | | colspan="2" | | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | Options | ||
|- | |- | ||
|- | |- | ||
| Line 238: | Line 238: | ||
| colspan="2" | Baud rate to be used | | colspan="2" | Baud rate to be used | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | Simulation | ||
|- | |- | ||
|- | |- | ||
Latest revision as of 14:37, 13 July 2026
| Author | MatrixTSL |
| Version | 1.0 |
| Category | Environmental |
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 | |