Start van regelaar
Dependencies: Encoder MODSERIAL mbed
Dependents: K9motoraansturing_copy lichtpoortjes
Diff: main.cpp
- Revision:
- 2:3d39bce54dfe
- Parent:
- 1:9d05c0236c7e
- Child:
- 3:c9c1c0ebf89d
--- a/main.cpp Wed Oct 09 06:49:17 2013 +0000 +++ b/main.cpp Wed Oct 09 09:41:56 2013 +0000 @@ -36,9 +36,9 @@ pwm_to_motor = (setpoint - motor1.getPosition())*.001; keep_in_range(&pwm_to_motor, -1,1); if(pwm_to_motor > 0) - motordir = 0; + motordir = 1; else - motordir = 1; + motordir = 0; //WRITE VALUE TO MOTOR pwm_motor.write(abs(pwm_to_motor)); }