blink led

Dependencies:   mbed

Committer:
jeddaboy
Date:
Tue Mar 04 03:38:16 2014 +0000
Revision:
0:5c69f3047359
slow

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jeddaboy 0:5c69f3047359 1 #include "mbed.h"
jeddaboy 0:5c69f3047359 2
jeddaboy 0:5c69f3047359 3 DigitalOut myled(LED1);
jeddaboy 0:5c69f3047359 4
jeddaboy 0:5c69f3047359 5 int main() {
jeddaboy 0:5c69f3047359 6 while(1) {
jeddaboy 0:5c69f3047359 7 myled = 1; // LED is ON
jeddaboy 0:5c69f3047359 8 wait(0.2); // 200 ms
jeddaboy 0:5c69f3047359 9 myled = 0; // LED is OFF
jeddaboy 0:5c69f3047359 10 wait(5.0); // 1 sec
jeddaboy 0:5c69f3047359 11 }
jeddaboy 0:5c69f3047359 12 }