窦 衍发
/
demo_program
My blinking LEDs
main.cpp@0:0b74b899525b, 2013-10-12 (annotated)
- Committer:
- shuihu
- Date:
- Sat Oct 12 09:58:54 2013 +0000
- Revision:
- 0:0b74b899525b
my blinking LEDs
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
shuihu | 0:0b74b899525b | 1 | #include "mbed.h" |
shuihu | 0:0b74b899525b | 2 | |
shuihu | 0:0b74b899525b | 3 | DigitalOut myled(LED1); |
shuihu | 0:0b74b899525b | 4 | |
shuihu | 0:0b74b899525b | 5 | int main() { |
shuihu | 0:0b74b899525b | 6 | while(1) { |
shuihu | 0:0b74b899525b | 7 | myled = 1; |
shuihu | 0:0b74b899525b | 8 | wait(0.2); |
shuihu | 0:0b74b899525b | 9 | myled = 0; |
shuihu | 0:0b74b899525b | 10 | wait(0.2); |
shuihu | 0:0b74b899525b | 11 | } |
shuihu | 0:0b74b899525b | 12 | } |