1.. zephyr:code-sample:: heart_rate
2   :name: Heart Rate Sensor
3   :relevant-api: sensor_interface
4
5   Get heart rate data from a sensor (polling mode).
6
7Overview
8********
9
10A sensor application that demonstrates how to poll data from a heart rate
11sensor.
12
13Requirements
14************
15
16* A supported heart rate sensor (e.g., MAX30101 or BH1790), available as ``heart-rate-sensor`` Devicetree alias.
17
18Building and Running
19********************
20
21This project configures a sensor on the board to enable the green LED and
22measure the reflected light with a photodiode. The raw data prints to the
23console. Further processing (not included in this sample) is required to
24extract a heart rate signal from the light measurement.
25
26.. zephyr-app-commands::
27   :zephyr-app: samples/sensor/heart_rate
28   :board: hexiwear/mk64f12
29   :goals: build
30   :compact:
31
32Sample Output
33=============
34
35.. code-block:: console
36
37   GREEN=5731
38   GREEN=5750
39   GREEN=5748
40   GREEN=5741
41   GREEN=5735
42   GREEN=5737
43   GREEN=5736
44   GREEN=5748
45
46<repeats endlessly>
47