Just a simple example of blinking led
Dependencies: mbed
Simple example of blinking led used as a starter to valid all the toolchain in Icarus Sensor System.
Diff: main.cpp
- Revision:
- 0:b729782a3ad7
- Child:
- 2:c76222c6370a
diff -r 000000000000 -r b729782a3ad7 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Nov 19 19:34:09 2014 +0000 @@ -0,0 +1,17 @@ +#include "mbed.h" + +DigitalOut myled1(p18); +DigitalOut myled2(p20); + +int main() { + while(1) { + myled1 = 1; // LED is ON + wait(0.05); // 200 ms + myled1 = 0; // LED is OFF + wait(0.05); // 1 sec + myled2 = 1; // LED is ON + wait(0.05); // 200 ms + myled2 = 0; // LED is OFF + wait(0.05); // 1 sec + } +} \ No newline at end of file