The latest development version of this page may be more current than this released 3.7.0 version.

SM351LT: Magnetoresistive Sensor Example

Overview

This sample application periodically polls an SM351LT magnetoresistive sensor and displays if a magnet near to the sensor, via the console.

Requirements

This sample uses the Honeywell SM351LT sensor.

References

For more information about the SM351LT magnetoresistive sensor see https://sensing.honeywell.com/SM351LT-low-power

Building and Running

The SM351LT (or compatible) sensors are available on the following boards:

Building on bt510

Ezurio Sentrius BT510 Sensor includes a Honeywell SM351LT magnetoresistive sensor.

west build -b bt510 samples/sensor/sm351lt
west flash

Sample Output

Polling at 0.5 Hz
#1 @ 6 ms: 1
#2 @ 2007 ms: 0
#3 @ 4009 ms: 0
#4 @ 6010 ms: 1
#5 @ 8012 ms: 1