Get measurement of magnetic field along the X, Y, and Z axes of the MAG3110 3-Axis chip
Simulink Coder Support Package for BBC micro:bit/Magnetometer
The MAG3110 3-Axis Magnetometer block measures the magnetic field along the X,
Y, and Z axes. The block has one output port, Magnet. The Magnet port outputs the
magnetic field as a
[1x3] vector in
Using the parameters of this block, you can select the Output
Data Rates (ODR) for the magnetometer. The Output Data Rates (ODR)
0.63 Hz to
Hold the board so that the board faces you and the line to the top of the MAG3110 3-Axis chip is aligned horizontally to the table. At this position, the X-axis is horizontal and points to the left, the Y-axis is vertical and points down, and the Z-axis points toward you.
The direction of the arrows shows the positive direction of the reading for the magnetometer.
When you tilt the board along the X, Y, and Z axes of the chip, this illustration shows the strength of the magnetic field.
Hold the board so that the board faces you, and the line to
the right of the chip is aligned vertically to the table. The magnetometer
on the chip measures the earth magnetic field along each sensor axis.
In the resultant
[1x3] vector, the first value
that represents the magnetic strength at the X-axis is minimum.
The block has one output port.
Magnet— Strength of the earth magnetic field along each axis of the chip
The block outputs the magnetic field as a
Each value represents the measurement of the magnetic field in
the X, Y, and Z axes.
Sensor output data rate (ODR)— Rate at which data is sampled
Specify the rate at which you want the magnetometer to read the measurement of the magnetic field.
Sample time— Specify how often the block reads data from the magnetometer on the chip
When you specify this parameter as
determines the best sample time for the block based on the block context
within the model.