Daiki Morita
/
17-7-5_22-06
all publish
main.cpp@0:fb4e25bf2473, 2019-05-06 (annotated)
- Committer:
- daikinect
- Date:
- Mon May 06 00:19:29 2019 +0000
- Revision:
- 0:fb4e25bf2473
all publish
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
daikinect | 0:fb4e25bf2473 | 1 | #include "mbed.h" |
daikinect | 0:fb4e25bf2473 | 2 | |
daikinect | 0:fb4e25bf2473 | 3 | DigitalOut myled(LED1); |
daikinect | 0:fb4e25bf2473 | 4 | |
daikinect | 0:fb4e25bf2473 | 5 | int main() { |
daikinect | 0:fb4e25bf2473 | 6 | while(1) { |
daikinect | 0:fb4e25bf2473 | 7 | myled = 1; // LED is ON |
daikinect | 0:fb4e25bf2473 | 8 | wait(0.2); // 200 ms |
daikinect | 0:fb4e25bf2473 | 9 | myled = 0; // LED is OFF |
daikinect | 0:fb4e25bf2473 | 10 | wait(1.0); // 1 sec |
daikinect | 0:fb4e25bf2473 | 11 | } |
daikinect | 0:fb4e25bf2473 | 12 | } |