LED hello world

Dependencies:   mbed

Committer:
Praktikant
Date:
Fri Apr 08 13:24:34 2016 +0000
Revision:
1:1d60dc3c3b08
Parent:
0:fb66e57f89c4
slowdown blink rate

Who changed what in which revision?

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