alles in elkaar met de mooie manier van de regelaar
Dependencies: Encoder HIDScope MODSERIAL TouchButton mbed-dsp mbed
Fork of Robot2mooiemanier by
Diff: main.cpp
- Revision:
- 14:1ff917c6ac45
- Parent:
- 13:722697791695
- Child:
- 15:737f5f448eb7
--- a/main.cpp Fri Oct 31 08:43:28 2014 +0000 +++ b/main.cpp Fri Oct 31 09:21:39 2014 +0000 @@ -644,8 +644,7 @@ } if (toestand == TERUGKEREN) { pc.printf("motor gaat terugkeren\n\r"); - pid(setspeed, motor1.getSpeed(),false); - + new_pwm = pid(setspeed, motor1.getSpeed(),false); pwm_motor1.write(new_pwm); pc.printf("new pwm %f\r\n",new_pwm); motordir1 = 0; @@ -655,7 +654,7 @@ pc.printf("ifwachten\n"); } if (toestand == SLAAN) { - new_pwm=pid(setspeed, motor1.getSpeed(),false); + new_pwm = pid(setspeed, motor1.getSpeed(),false); motordir1 = 1; pwm_motor1.write(new_pwm); pc.printf("SLAAN\n");