![](/media/cache/profiles/cc38c8ffd23cef2e3e5c21d20c1db636.jpg.50x50_q85.png)
all publish
Dependencies: mbed QEI PID Motor
main.cpp@0:c011ccc8e25e, 2019-05-06 (annotated)
- Committer:
- daikinect
- Date:
- Mon May 06 00:20:00 2019 +0000
- Revision:
- 0:c011ccc8e25e
all publish
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
daikinect | 0:c011ccc8e25e | 1 | #include "mbed.h" |
daikinect | 0:c011ccc8e25e | 2 | |
daikinect | 0:c011ccc8e25e | 3 | DigitalOut myled(LED1); |
daikinect | 0:c011ccc8e25e | 4 | |
daikinect | 0:c011ccc8e25e | 5 | int main() { |
daikinect | 0:c011ccc8e25e | 6 | while(1) { |
daikinect | 0:c011ccc8e25e | 7 | myled = 1; // LED is ON |
daikinect | 0:c011ccc8e25e | 8 | wait(0.2); // 200 ms |
daikinect | 0:c011ccc8e25e | 9 | myled = 0; // LED is OFF |
daikinect | 0:c011ccc8e25e | 10 | wait(1.0); // 1 sec |
daikinect | 0:c011ccc8e25e | 11 | } |
daikinect | 0:c011ccc8e25e | 12 | } |