BMM150 Magnetometer
Add-On Required: This feature requires the Simulink Support Package for Raspberry Pi Hardware add-on.
Libraries:
Simulink Support Package for Raspberry Pi Hardware /
Sensors /
IMU Sensors
Description
The BMM150 block outputs the values of magnetic field along x-, y- and z- axes as measured by the BMM150 sensor connected to Raspberry Pi® board.
Ports
Output
Magnetic Field — Magnetic field strength measured by a BMM150 sensor
row vector
Magnetic field strength (in µT) measured by a BMM150 sensor connected to Raspberry Pi board, along the x-, y- and z- axes, specified as a row vector [x,y,z].
Data Types: double
Magnetic Field Status — Status of magnetic field value
0
| 1
Status of magnetic field 0
indicates that the data read is new
and 1
indicates that the data read is not new.
Dependencies
This output port appears only if you select the Status parameter.
Data Types: int8
Parameters
I2C module — Module for communication
1
(default)
Specify the module on the board that you are using for I2C communication.
I2C address — I2C address of BMM150 sensor
0x13
(default) | 0x10
| 0x11
| 0x12
The I2C address used by BMM150 sensor communicating with the Raspberry Pi processor. The default parameter value (0x13
)
corresponds to the value mentioned in the Schematics
section of the
BOOSTXL-SENSORS BoosterPackTM Plug-in Module User's
Guide.
Status — Set output port for obtaining magnetic field status
on
(default) | off
Select this parameter to set Magnetic Field Status as one of the output ports.
Preset value — Preset value for the operating condition of BMM150 sensor
Low power
(default) | Regular
| Enhanced
| High accuracy
Specify the preset value for the operating condition of BMM150 sensor while reading the values. The selection of one of the four preset values affects the electrical characteristics (like supply current) and the required output accuracy with respect to ODR and output noise.
Data type — Output data type for values from BMM150 sensor
single
(default) | double
Specify the output data type for the values read from BMM150 sensor. The default
data type for Raspberry Pi processors is single
. Use this parameter to change the
values to double
, if required.
Sample time — Time interval to read data
-1
(default) | positive integer
Specify how often this block reads the data from the BMM150 sensor. When you set this parameter to -1, Simulink determines the best sample time for the block based on the block context within the model.
Version History
Introduced in R2022b
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)