zephyr/samples/basic/fade_led
Simon Glass f895cf4d9c samples: fade_led: Correct the sample name in the docs
The docs do not match the directory this sample is in. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-06-09 10:24:43 -05:00
..
src zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
CMakeLists.txt samples: make find_package(Zephyr...) REQUIRED 2020-05-29 10:47:25 +02:00
prj.conf driver: pwm: use new logger 2018-10-08 17:49:12 -04:00
README.rst samples: fade_led: Correct the sample name in the docs 2020-06-09 10:24:43 -05:00
sample.yaml tests: fix test identifiers 2019-12-09 15:53:44 -05:00

.. _fade-led-sample:

Fade LED
########

Overview
********

This application "fades" a LED using the :ref:`PWM API <pwm_api>`.

The LED starts off increases its brightness until it is fully or nearly fully
on. The brightness then decreases until the LED is off, completing on fade
cycle. Each cycle takes 2.5 seconds, and the cycles repeat forever.

Requirements and Wiring
***********************

This sample has the same requirements and wiring considerations as the
:ref:`pwm-blinky-sample`.

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

To build and flash this sample for the :ref:`nrf52840dk_nrf52840`:

.. zephyr-app-commands::
   :zephyr-app: samples/basic/fade_led
   :board: nrf52840dk_nrf52840
   :goals: build flash
   :compact:

Change ``nrf52840dk_nrf52840`` appropriately for other supported boards.

After flashing, the sample starts fading the LED as described above. It also
prints information to the board's console.