zephyr/samples/basic/blink_led
Kumar Gala e547533435 samples: convert to using newly introduced integer sized types
Convert code to use u{8,16,32,64}_t and s{8,16,32,64}_t instead of C99
integer types.

Jira: ZEP-2051

Change-Id: I08c682bfc0b80dfa88de859e90a011bcd2db2762
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-21 09:53:53 -05:00
..
src samples: convert to using newly introduced integer sized types 2017-04-21 09:53:53 -05:00
Makefile samples: basic: Move pwm driver samples 2017-01-11 15:15:31 +00:00
README.rst doc: add labels to basic sample docs 2017-04-04 19:51:47 +00:00
prj.conf samples: basic: Move pwm driver samples 2017-01-11 15:15:31 +00:00
testcase.ini samples: basic: Move pwm driver samples 2017-01-11 15:15:31 +00:00

README.rst

.. _blink-led-sample:

PWM: Blink LED
##############

Overview
********

This is a sample app which blinks a LED using PWM.

The LED will start at a blinking frequency of 0.5Hz. Every 4 seconds,
the blinking frequency will double. When the blinking frequency
reaches 500Hz, the blinking frequency will be halved every 4 seconds
until the blinking frequency reaches 0.5Hz. This completes a whole
blinking cycle. From now on, the LED will repeat the blinking cycle
for ever.

Wiring
******

Arduino 101 and Quark D2000 CRB
===============================
You will need to connect the LED to ground and PWM0 via the shield.
You may need a current limiting resistor. See your LED datasheet.

Nucleo_F401RE and Nucleo_L476RG
===============================
Connect PWM2(PA0) to LED

Nucleo_F103RB
=============
Connect PWM1(PA8) to LED

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

This sample can be built for multiple boards, in this example we will build it
for the arduino_101 board:

.. code-block:: console

   $ cd samples/basic/blink_led
   $ make BOARD=arduino_101
   $ make BOARD=arduino_101 flash

After flashing the image to the board, the user LED on the board should start to
blinking as discussed in overview