a
Dependencies: Locate Move Servo button mbed
Fork of 3rdcompfixstart by
main.cpp@6:931d51a70200, 2016-09-05 (annotated)
- Committer:
- sakanakuuun
- Date:
- Mon Sep 05 10:39:03 2016 +0000
- Revision:
- 6:931d51a70200
- Parent:
- 5:97d9a34e5016
- Child:
- 7:43692ae2d20a
aa
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
sakanakuuun | 0:f12d257b587e | 1 | #include "mbed.h" |
choutin | 3:56b034c41dc5 | 2 | #include "math.h" |
sakanakuuun | 4:1604d599d40f | 3 | #include "locate.h" |
sakanakuuun | 4:1604d599d40f | 4 | #include "move.h" |
choutin | 3:56b034c41dc5 | 5 | |
sakanakuuun | 4:1604d599d40f | 6 | int main() |
sakanakuuun | 4:1604d599d40f | 7 | { |
sakanakuuun | 4:1604d599d40f | 8 | setup(); |
sakanakuuun | 4:1604d599d40f | 9 | initmotor(); |
sakanakuuun | 6:931d51a70200 | 10 | |
sakanakuuun | 6:931d51a70200 | 11 | wait(1); |
sakanakuuun | 6:931d51a70200 | 12 | |
sakanakuuun | 6:931d51a70200 | 13 | while(1) { |
sakanakuuun | 6:931d51a70200 | 14 | pmove_to_dir(X_PLUS, 600, 0); |
sakanakuuun | 6:931d51a70200 | 15 | pmove_to_dir(Y_PLUS, 600, 600); |
sakanakuuun | 6:931d51a70200 | 16 | pmove_to_dir(X_MINUS, 0, 600); |
sakanakuuun | 6:931d51a70200 | 17 | pmove_to_dir(Y_MINUS, 0, 0); |
sakanakuuun | 6:931d51a70200 | 18 | } |
sakanakuuun | 6:931d51a70200 | 19 | //turn_abs_rad(PI/2); |
choutin | 3:56b034c41dc5 | 20 | |
sakanakuuun | 4:1604d599d40f | 21 | while(1) { |
sakanakuuun | 4:1604d599d40f | 22 | update(); |
choutin | 3:56b034c41dc5 | 23 | } |
choutin | 3:56b034c41dc5 | 24 | } |
choutin | 3:56b034c41dc5 | 25 | |
choutin | 3:56b034c41dc5 | 26 | |
choutin | 3:56b034c41dc5 | 27 | /* |
choutin | 3:56b034c41dc5 | 28 | int main(){ |
choutin | 3:56b034c41dc5 | 29 | setup(); |
choutin | 3:56b034c41dc5 | 30 | initmotor(); |
choutin | 3:56b034c41dc5 | 31 | |
choutin | 3:56b034c41dc5 | 32 | for(int i=0; i < 4; i++) |
choutin | 3:56b034c41dc5 | 33 | { |
choutin | 3:56b034c41dc5 | 34 | movelength(1200); |
choutin | 3:56b034c41dc5 | 35 | turnccw(); |
choutin | 3:56b034c41dc5 | 36 | } |
sakanakuuun | 4:1604d599d40f | 37 | }*/ |