Slowing Motors in Driver Control

How do I slow my motors in Driver Control? I have a turret for a tank that I need to slow down. were using V2 for this project. can anyone help? I need an answer/solution soon since our pep-rally is on Wednesday morning

  1. you can gear it down (using physical gears)
  2. you can move the joysticks “slowly” (drive better)
  3. you can program the output to be 1/2 of the joystick (twice as slow) if you have enough torque (needs programming background)
  4. you can use a half dead battery if you have LOTS of torque

(#4 was a joke, but if you do not have time to do 1, 2, or 3 then you can attempt #4)

Here is how you can implement this Murdomeeks method 3.
I assume your existing turret programming looks something like this in EasyCv2.


MotorRcControl(t#,chan#,motor#,inv); // control turret

To lower the speed of the turret with programming, you’ll need to split this into 2-3 pieces; get the TX value to a variable, modify the variable, apply to motor.

EasyCv2 uses motor speed range 0 (ccw) to 127 (stop) to 255(clockwise),
so you can’t just divide the speed by 2 (or other value) because that will make 255 (full-on) turn into 127 (stop).
So subtract 127 first, then scale, then re-add 127.

Add 2 Variables:
unsigned char t_val 0;
unsigned float scale 1.8; // change this to be whatever scale you need

Comment out previous MotorRcControl(t#,chan#,motor#,inv);
Add these three lines instead

  t_val = GetRxInput(t#,chan#);
  t_val = ((t_val - 127) / scale ) + 127; // assignment statement pulldown
  SetMotor( motor#, t_val );

Good luck with your demo.