
Control of motors
Dependencies: MODSERIAL QEI mbed
Diff: main.cpp
- Revision:
- 2:e4f92118a829
- Parent:
- 1:941f4059c0de
- Child:
- 3:fea443c3be53
--- a/main.cpp Fri Sep 28 09:20:44 2018 +0000 +++ b/main.cpp Fri Sep 28 09:23:02 2018 +0000 @@ -21,7 +21,7 @@ Duty2 = potmeter2.read(); // read value potentiometer 2 MotorSignal1 = 2*Duty1 - 1; //scaling potmeter to motor control signal [0 - 1] --> [(-1) - 1] - MotorSignal2 = 2*Duty2 - 1; + MotorSignal2 = 1 - 2*Duty2; } int main()