LED blinky

Dependencies:   mbed

Committer:
shrutimk
Date:
Tue Feb 10 05:06:06 2015 +0000
Revision:
2:488f7e70d8b7
Parent:
1:4a71303b813e
Changed blink rate

Who changed what in which revision?

UserRevisionLine numberNew contents of line
shrutimk 0:9c16a9754a72 1 #include "mbed.h"
shrutimk 0:9c16a9754a72 2
shrutimk 1:4a71303b813e 3 DigitalOut led1(LED1);
shrutimk 1:4a71303b813e 4 DigitalOut led2(LED2);
shrutimk 0:9c16a9754a72 5
shrutimk 0:9c16a9754a72 6 int main()
shrutimk 0:9c16a9754a72 7 {
shrutimk 0:9c16a9754a72 8 while (true) {
shrutimk 0:9c16a9754a72 9 led1 = 1; // toggle led
shrutimk 0:9c16a9754a72 10 led2 = 1;
shrutimk 2:488f7e70d8b7 11 wait(0.5);
shrutimk 0:9c16a9754a72 12 led1 = 0;
shrutimk 0:9c16a9754a72 13 led2 = 0;
shrutimk 2:488f7e70d8b7 14 wait(0.5);
shrutimk 0:9c16a9754a72 15 }
shrutimk 0:9c16a9754a72 16 }