Kosuke Yagi
/
mbed_blinky_delay
Lチカする間隔がだんだん大きくなっていきます
main.cpp@1:5b034f71ec5f, 2015-11-14 (annotated)
- Committer:
- patchgi
- Date:
- Sat Nov 14 05:21:10 2015 +0000
- Revision:
- 1:5b034f71ec5f
- Parent:
- 0:300909268cb9
?????
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
patchgi | 0:300909268cb9 | 1 | #include "mbed.h" |
patchgi | 0:300909268cb9 | 2 | |
patchgi | 0:300909268cb9 | 3 | DigitalOut myled(dp18); |
patchgi | 0:300909268cb9 | 4 | |
patchgi | 0:300909268cb9 | 5 | int main() { |
patchgi | 1:5b034f71ec5f | 6 | float delay=0.2; |
patchgi | 0:300909268cb9 | 7 | while(1) { |
patchgi | 0:300909268cb9 | 8 | myled = 1; |
patchgi | 0:300909268cb9 | 9 | wait(delay); |
patchgi | 0:300909268cb9 | 10 | myled = 0; |
patchgi | 0:300909268cb9 | 11 | wait(delay); |
patchgi | 1:5b034f71ec5f | 12 | delay+=0.1 |
patchgi | 0:300909268cb9 | 13 | } |