MagneticFieldSensor
Last Updated On 2021-07-16
Version 1MinSDK 7Tutorial Video
Non-visible component that measures the ambient geomagnetic field for all three physical axes (x, y, z) in Tesla https://en.wikipedia.org/wiki/Tesla_(unit).
Properties
You can set the below properties in the UI part of the builder.
- Enabled - it's a boolean value which is set to true by default.
Block Properties
You can set the below blocks properties in the blocks section of the builder.
AbsoluteStrength
Indicates the absolute strength of the field.
Available
Indicates that there is a magnetic field sensor in the device and it is available.
Enabled
Indicates whether or not the magnetic field sensor is enabled and working.
MaximumRange
Indicates the maximum range the magnetic sensor can reach.
XStrength
Indicates the field's strength in the X-axis.
YStrength
Indicates the field's strength in the Y-axis.
ZStrength
Indicates the field's strength in the Z-axis.
Events
You can set the below event blocks in the blocks section of the builder.
MagneticChanged
Triggers when magnetic field has changed, setting the new values in parameters.