|
Page 1 of 1
|
[ 2 posts ] |
|
Author |
Message |
jaredkpln1
Rookie
Joined: Wed Mar 30, 2016 10:48 am Posts: 3
|
 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
|
Mon Mar 05, 2018 12:20 pm |
|
 |
jkandra
Rookie
Joined: Thu Sep 25, 2014 8:34 pm Posts: 25
|
 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).
|
Sun Mar 25, 2018 8:20 pm |
|
|
|
Page 1 of 1
|
[ 2 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 2 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|