Blink with busy waits

Dependencies:   mbed

main.cpp

Committer:
lmottola
Date:
2018-11-08
Revision:
0:cbfa5cd9558b

File content as of revision 0:cbfa5cd9558b:

#include "mbed.h"

DigitalOut led(LED1);

int main()
{
    while(1) {
        led = 1; // LED is ON
        wait(0.2); // 200 ms
        led = 0; // LED is OFF
        wait(0.8); // 800 ms
    }
}