Page 1 of 1

RotateMotorEx Problem

Posted: 10 Nov 2011, 13:41
by fuzzball27
I'm working on a project that requires precision movements, and for whatever reason I get a problem with this bit of code:

Code: Select all

RotateMotorEx(BOTH, 75, DEGREES, 0, true, true);//BOTH is OUT_AC, DEGREES = 180
RotateMotorEx(BOTH, 50, TURN_90, 100, true, true);//TURN_90 = 220
RotateMotorEx(BOTH, 75, DEGREES/2, 0, true, true);
The third line causes the robot to turn at full power. Am I missing something?

Re: RotateMotorEx Problem

Posted: 28 Dec 2011, 15:25
by pepijndevos
I think RotateMotor puts the motor in REGULATE_SPEED, which means that it might indeed accelerate to full power to turn at the desired actual speed.

At least in my experience, depending on the load, you have to use much less power with speed regulation than with directly controlling the power.