zephyr/samples/basic/fade_led
Martí Bolívar 0156b6c185 samples: fade_led: cleanups and fixups
Align the sample and its documentation with the other basic samples.

Adjust the fade algorithm so that it looks better and takes less time
to verify by taking 2.5 seconds instead of 10.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-05-13 19:51:01 +02:00
..
src samples: fade_led: cleanups and fixups 2020-05-13 19:51:01 +02:00
CMakeLists.txt cmake: use find_package to locate Zephyr 2020-03-27 16:23:46 +01:00
README.rst samples: fade_led: cleanups and fixups 2020-05-13 19:51:01 +02:00
prj.conf
sample.yaml tests: fix test identifiers 2019-12-09 15:53:44 -05:00

README.rst

.. _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/blink_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.