robot
Dependencies: Encoder HIDScope MODSERIAL TouchButton mbed-dsp mbed
Fork of Robot2false by
Diff: main.cpp
- Revision:
- 60:c4cf57749f2e
- Parent:
- 59:a5442a3811ed
- Child:
- 61:6bf3935b9e74
--- a/main.cpp Mon Nov 03 20:48:51 2014 +0000 +++ b/main.cpp Mon Nov 03 20:50:58 2014 +0000 @@ -690,7 +690,7 @@ } break; case 2: - if (motor2.getPosition()<= 4) { + if (motor2.getPosition()<= 50) { motordir2 = 0; pwm_motor2.write(PWM2); } else { @@ -710,7 +710,7 @@ case SLAAN: pc.printf("SLAAN\n"); new_pwm = pid(setspeed, omega); - pwm_motor1.write(0.8); //=================================================================================================== + pwm_motor1.write(new_pwm); //=================================================================================================== motordir1 = 1; if (motor1.getPosition() <= ANGLEMAX) { toestand = TERUGKEREN;