Blinky LED for PoliMI

Dependencies:   mbed

Committer:
daz
Date:
Wed Mar 16 16:43:55 2016 +0000
Revision:
0:dd18284fc9fc
Classic Blinky LED Hello World for demo purposes

Who changed what in which revision?

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