robot
Dependencies: Encoder HIDScope MODSERIAL TouchButton mbed-dsp mbed
Fork of Robot2false by
Diff: main.cpp
- Revision:
- 25:b58e10cbd35b
- Parent:
- 24:a165dcd86710
- Child:
- 26:bee27c74a835
--- a/main.cpp Fri Oct 31 14:54:49 2014 +0000 +++ b/main.cpp Sat Nov 01 12:07:37 2014 +0000 @@ -80,6 +80,7 @@ float highpass_states[4]; bool stop; +float new_pos; float new_pwm; float PWM2 = 0.3; //PWM voor instellen hoek batje int toestand = WACHTEN; //terugkeren? @@ -719,7 +720,8 @@ } if (toestand == WACHTEN) { pwm_motor1.write(0); - pidpositie(ANGLEMIN, motor1.getPosition()); + new_pos=pidpositie(ANGLEMIN, motor1.getPosition()); + pc.printf("new position %f\r\n", new_pos); //pc.printf("ifwachten2\n"); } //sturen naar HID Scope