Honza T.
/
KUBA_blikani_001
Simple blink test.
main.cpp@0:0f248bf5f3ac, 2015-12-12 (annotated)
- Committer:
- dzoni
- Date:
- Sat Dec 12 19:37:25 2015 +0000
- Revision:
- 0:0f248bf5f3ac
- Child:
- 1:4cfdf1527e74
Release 1.0
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
dzoni | 0:0f248bf5f3ac | 1 | #include "mbed.h" |
dzoni | 0:0f248bf5f3ac | 2 | |
dzoni | 0:0f248bf5f3ac | 3 | DigitalOut myled(LED1); |
dzoni | 0:0f248bf5f3ac | 4 | |
dzoni | 0:0f248bf5f3ac | 5 | int main() { |
dzoni | 0:0f248bf5f3ac | 6 | while(1) { |
dzoni | 0:0f248bf5f3ac | 7 | myled = 1; // LED is ON |
dzoni | 0:0f248bf5f3ac | 8 | wait(0.1); // 200 ms |
dzoni | 0:0f248bf5f3ac | 9 | myled = 0; // LED is OFF |
dzoni | 0:0f248bf5f3ac | 10 | wait(0.1); // 1 sec |
dzoni | 0:0f248bf5f3ac | 11 | } |
dzoni | 0:0f248bf5f3ac | 12 | } |