robot
Dependencies: Encoder HIDScope MODSERIAL TouchButton mbed-dsp mbed
Fork of Robot2false by
Diff: main.cpp
- Revision:
- 32:92c8aa0408f8
- Parent:
- 29:f26796cca47f
- Child:
- 33:2f9c21ac9175
diff -r f26796cca47f -r 92c8aa0408f8 main.cpp --- a/main.cpp Sat Nov 01 14:11:01 2014 +0000 +++ b/main.cpp Sat Nov 01 14:20:57 2014 +0000 @@ -675,7 +675,7 @@ pc.printf("toestand = terugkeren\n\r"); } if (toestand == WACHTEN) { - pidpositie(ANGLEMIN, motor1.getPosition()); + pidpositie(ANGLEMAX, motor1.getPosition()); pwm_motor1.write(0); pc.printf("ifwachten\n"); } @@ -686,9 +686,9 @@ motordir1 = 1; pc.printf("SLAAN\n"); - if (toestand == TERUGKEREN) { - pidpositie(ANGLEMAX, motor1.getPosition()); - } + /*if (toestand == TERUGKEREN) { + pidpositie(ANGLEMIN, motor1.getPosition()); + }/* /*if (toestand == TERUGKEREN) { @@ -722,7 +722,7 @@ } if (toestand == WACHTEN) { pwm_motor1.write(0); - //new_pos=pidpositie(ANGLEMIN, motor1.getPosition()); + new_pos=pidpositie(ANGLEMIN, motor1.getPosition()); pc.printf("new position %f\r\n", new_pos); //pc.printf("ifwachten2\n"); }