zephyr/samples/sensor/sm351lt
Benjamin Cabé 0ff3f0d364 boards: ezurio: adopt new zephyr:board directive and role
This updates the documentation of all the Ezurio boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
..
src
CMakeLists.txt
README.rst
prj.conf
sample.yaml

README.rst

.. zephyr:code-sample:: sm351lt
   :name: SM351LT Magnetoresistive Sensor
   :relevant-api: sensor_interface

   Detect a magnet's presence using the SM351LT magnetoresistive sensor (polling & trigger mode).

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:

* :zephyr:board:`bt510`

Building on bt510
==================

:zephyr:board:`bt510` includes a Honeywell SM351LT magnetoresistive sensor.

.. zephyr-app-commands::
   :zephyr-app: samples/sensor/sm351lt
   :board: bt510
   :goals: build flash
   :compact:

Sample Output
=============

.. code-block:: console

    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