sato man
/
led_test
LED hello world
main.cpp@1:7c9c5f576ef8, 2014-05-05 (annotated)
- Committer:
- sato3183
- Date:
- Mon May 05 05:49:02 2014 +0000
- Revision:
- 1:7c9c5f576ef8
- Parent:
- 0:74b92ef15b5b
slowdown blink rate
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
sato3183 | 0:74b92ef15b5b | 1 | #include "mbed.h" |
sato3183 | 0:74b92ef15b5b | 2 | |
sato3183 | 0:74b92ef15b5b | 3 | DigitalOut myled(LED1); |
sato3183 | 0:74b92ef15b5b | 4 | DigitalOut myled2(LED2); |
sato3183 | 0:74b92ef15b5b | 5 | |
sato3183 | 0:74b92ef15b5b | 6 | int main() { |
sato3183 | 0:74b92ef15b5b | 7 | while(1) { |
sato3183 | 0:74b92ef15b5b | 8 | myled = 1; |
sato3183 | 0:74b92ef15b5b | 9 | myled2 = 0; |
sato3183 | 1:7c9c5f576ef8 | 10 | wait(0.5); |
sato3183 | 0:74b92ef15b5b | 11 | myled = 0; |
sato3183 | 0:74b92ef15b5b | 12 | myled2 = 1; |
sato3183 | 1:7c9c5f576ef8 | 13 | wait(0.5); |
sato3183 | 0:74b92ef15b5b | 14 | } |
sato3183 | 0:74b92ef15b5b | 15 | } |