1.. _fade-led-sample: 2 3Fade LED 4######## 5 6Overview 7******** 8 9This application "fades" a LED using the :ref:`PWM API <pwm_api>`. 10 11The LED starts off increases its brightness until it is fully or nearly fully 12on. The brightness then decreases until the LED is off, completing on fade 13cycle. Each cycle takes 2.5 seconds, and the cycles repeat forever. The PWM 14period is taken from Devicetree. It should be fast enough to be above the 15flicker fusion threshold. 16 17Requirements and Wiring 18*********************** 19 20This sample has the same requirements and wiring considerations as the 21:ref:`pwm-blinky-sample`. 22 23Building and Running 24******************** 25 26To build and flash this sample for the :ref:`nrf52840dk_nrf52840`: 27 28.. zephyr-app-commands:: 29 :zephyr-app: samples/basic/fade_led 30 :board: nrf52840dk_nrf52840 31 :goals: build flash 32 :compact: 33 34Change ``nrf52840dk_nrf52840`` appropriately for other supported boards. 35 36After flashing, the sample starts fading the LED as described above. It also 37prints information to the board's console. 38