ROBOTC.net forums
http://www.robotc.net/forums/

Curving Robot
http://www.robotc.net/forums/viewtopic.php?f=1&t=19580
Page 1 of 1

Author:  jaredkpln1 [ Mon Mar 05, 2018 12:20 pm ]
Post subject:  Curving Robot

I bought a new set of EV3's for my robotics class this year. When my students set the robot's speed to 100% the robot starts to curve, instead of driving straight. The code will look like the picture below.

https://www.dropbox.com/s/du1l9neyi5rtc ... e.GIF?dl=0

Author:  jkandra [ Sun Mar 25, 2018 8:20 pm ]
Post subject:  Re: Curving Robot

Have you tried synchronizing the motors?

void driveForward() {
setMotorSync(B, C, 0, powerLevel);
}

When the motors are 'synchronized' (in this example: B & C), the robot will try to make sure that they each turn the exact same (specified by 3rd parameter zero) degrees of rotation. If one tire starts turning slower because of friction from some source, the robot will try applying less power to the other motor to compensate for the difference in rotations. Synchronizing the motors can also be used to make turns where the third parameter varies between -100 and +100. It will go straight when the third parameter is zero.

With the program example you submitted, the motors are not synchronized, but instead, act independently of one another (albeit at the same power level).

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/