Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
-
fuzzball27
- Posts: 103
- Joined: 29 Sep 2010, 17:14
- Location: US
Post
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?
fuzzball27 >>-->
-
pepijndevos
- Posts: 175
- Joined: 28 Dec 2011, 13:07
- Location: Gelderland, Netherlands
-
Contact:
Post
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.
Users browsing this forum: No registered users and 5 guests