Hello world program that just gets CustomExplorerRobot moving.
Dependencies: CustomExplorerRobot mbed
main.cpp@2:c229703e7a5a, 2016-02-27 (annotated)
- Committer:
- Usuke
- Date:
- Sat Feb 27 10:05:46 2016 +0000
- Revision:
- 2:c229703e7a5a
- Parent:
- 0:b14e99f78c69
??
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Usuke | 0:b14e99f78c69 | 1 | #include "mbed.h" |
Usuke | 0:b14e99f78c69 | 2 | #include "CustomExplorerRobot.h" |
Usuke | 0:b14e99f78c69 | 3 | |
Usuke | 0:b14e99f78c69 | 4 | CustomExplorerRobot cer; |
Usuke | 0:b14e99f78c69 | 5 | |
Usuke | 0:b14e99f78c69 | 6 | int main() { |
Usuke | 0:b14e99f78c69 | 7 | |
Usuke | 0:b14e99f78c69 | 8 | wait(0.5f); |
Usuke | 0:b14e99f78c69 | 9 | cer.forward(0.5f); |
Usuke | 0:b14e99f78c69 | 10 | wait(0.5f); |
Usuke | 0:b14e99f78c69 | 11 | cer.left(0.5f); |
Usuke | 0:b14e99f78c69 | 12 | wait(0.5f); |
Usuke | 0:b14e99f78c69 | 13 | cer.backward(0.5f); |
Usuke | 0:b14e99f78c69 | 14 | wait(0.5f); |
Usuke | 0:b14e99f78c69 | 15 | cer.right(0.5f); |
Usuke | 0:b14e99f78c69 | 16 | wait(0.5f); |
Usuke | 0:b14e99f78c69 | 17 | cer.stop(); |
Usuke | 0:b14e99f78c69 | 18 | |
Usuke | 0:b14e99f78c69 | 19 | return 0; |
Usuke | 0:b14e99f78c69 | 20 | } |