zephyr/samples/basic/blinky
Martí Bolívar 748c7757ea samples: blinky: clean up error on unsupported board
This sample requires led0 in the board devicetree's /aliases.
Improve the error message when that is not available.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-03-04 21:50:43 +02:00
..
src samples: blinky: clean up error on unsupported board 2020-03-04 21:50:43 +02:00
CMakeLists.txt
README.rst samples: blinky: Improve documentation 2020-03-04 21:50:43 +02:00
prj.conf
sample.yaml

README.rst

.. _blinky-sample:

Blinky sample
#############

Overview
********

The Blinky example shows how to configure GPIO pins as outputs which can also be
used to drive LEDs on the hardware usually delivered as "User LEDs" on many of
the supported boards in Zephyr.

.. _blinky-sample-requirements:

Requirements
************

The demo assumes that an LED is connected to one of GPIO lines. The
sample code is configured to work on boards that have defined the ``led0``
alias in their :ref:`board's devicetree description file
<devicetree-in-out-files>`, :file:`<board>.dts`.
Doing so will generate these variables:

- ``DT_ALIAS_LED0_GPIOS_CONTROLLER``
- ``DT_ALIAS_LED0_GPIOS_PIN``

Building and Running
********************

This sample does not output anything to the console. It can be built and
flashed to a board as follows:

.. zephyr-app-commands::
   :zephyr-app: samples/basic/blinky
   :board: reel_board
   :goals: build flash
   :compact:

After flashing the image to the board, the user LED on the board should start to
blink.