John Doe
/
Nucleo_blink_led
.
main.cpp@0:1eec1438dc44, 2014-07-08 (annotated)
- Committer:
- Anonymous
- Date:
- Tue Jul 08 06:29:21 2014 +0000
- Revision:
- 0:1eec1438dc44
Nucleo_Blink
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Anonymous | 0:1eec1438dc44 | 1 | #include "mbed.h" |
Anonymous | 0:1eec1438dc44 | 2 | |
Anonymous | 0:1eec1438dc44 | 3 | DigitalOut myled(LED1); |
Anonymous | 0:1eec1438dc44 | 4 | |
Anonymous | 0:1eec1438dc44 | 5 | int main() { |
Anonymous | 0:1eec1438dc44 | 6 | while(1) { |
Anonymous | 0:1eec1438dc44 | 7 | myled = 1; // LED is ON |
Anonymous | 0:1eec1438dc44 | 8 | wait(0.5); // 200 ms |
Anonymous | 0:1eec1438dc44 | 9 | myled = 0; // LED is OFF |
Anonymous | 0:1eec1438dc44 | 10 | wait(0.5); // 1 sec |
Anonymous | 0:1eec1438dc44 | 11 | } |
Anonymous | 0:1eec1438dc44 | 12 | } |