Blink LED example.

Dependencies:   mbed-STM32F103C8T6

Committer:
bcostm
Date:
Wed Jul 05 14:35:00 2017 +0000
Revision:
0:d5bd863b2036
Child:
1:6554c60faa06
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bcostm 0:d5bd863b2036 1 #include "mbed.h"
bcostm 0:d5bd863b2036 2
bcostm 0:d5bd863b2036 3 // Check the board pinout image to see which pin corresponds to LED1 label
bcostm 0:d5bd863b2036 4 DigitalOut led_green(LED1);
bcostm 0:d5bd863b2036 5
bcostm 0:d5bd863b2036 6 int main()
bcostm 0:d5bd863b2036 7 {
bcostm 0:d5bd863b2036 8 while(1) {
bcostm 0:d5bd863b2036 9 led_green = 1; // LED is ON
bcostm 0:d5bd863b2036 10 wait(0.2); // 200 ms
bcostm 0:d5bd863b2036 11 led_green = 0; // LED is OFF
bcostm 0:d5bd863b2036 12 wait(0.8); // 800 ms
bcostm 0:d5bd863b2036 13 }
bcostm 0:d5bd863b2036 14 }