aaron xu
/
Nucleo_blinky_l0_aaron
fork demonstration
Fork of Nucleo_blinky_l0 by
main.cpp@2:d6d94585a40a, 2014-10-29 (annotated)
- Committer:
- aaronxu
- Date:
- Wed Oct 29 07:00:20 2014 +0000
- Revision:
- 2:d6d94585a40a
- Parent:
- 0:fb8d3cec05ec
third
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
hemddabral | 0:fb8d3cec05ec | 1 | #include "mbed.h" |
hemddabral | 0:fb8d3cec05ec | 2 | |
hemddabral | 0:fb8d3cec05ec | 3 | DigitalOut myled(LED1); |
hemddabral | 0:fb8d3cec05ec | 4 | |
hemddabral | 0:fb8d3cec05ec | 5 | int main() { |
hemddabral | 0:fb8d3cec05ec | 6 | while(1) { |
hemddabral | 0:fb8d3cec05ec | 7 | myled = 1; // LED is ON |
hemddabral | 0:fb8d3cec05ec | 8 | wait(0.2); // 200 ms |
hemddabral | 0:fb8d3cec05ec | 9 | myled = 0; // LED is OFF |
hemddabral | 0:fb8d3cec05ec | 10 | wait(1.0); // 1 sec |
hemddabral | 0:fb8d3cec05ec | 11 | } |
hemddabral | 0:fb8d3cec05ec | 12 | } |