• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

src/04-Jan-2025-6142

CMakeLists.txtD04-Jan-2025228 96

README.rstD04-Jan-2025758 3222

prj.confD04-Jan-202574 54

sample.yamlD04-Jan-2025369 1615

README.rst

1.. zephyr:code-sample:: soc_voltage
2   :name: SoC Voltage Sensor
3   :relevant-api: sensor_interface
4
5   Get voltage data from an SoC's voltage sensor(s).
6
7Overview
8********
9
10This sample reads one or more of the various voltage sensors an SoC might have and
11displays the results.
12
13Building and Running
14********************
15
16In order to run this sample, enable the sensor node that supports
17``SENSOR_CHAN_VOLTAGE`` and create an alias named ``volt-sensor0`` to link to the node.
18The tail ``0`` is the sensor number.  This sample support up to 16 sensors.
19
20.. zephyr-app-commands::
21   :zephyr-app: samples/sensor/soc_voltage
22   :board: nucleo_g071rb
23   :goals: build
24   :compact:
25
26Sample Output
27=============
28
29.. code-block:: console
30
31   Sensor voltage: 2.99 V
32