View unanswered posts | View active topics It is currently Wed Aug 05, 2020 4:42 am

Reply to topic  [ 2 posts ] 
Curving Robot 
Author Message

Joined: Wed Mar 30, 2016 10:48 am
Posts: 4
Post 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. ... e.GIF?dl=0

Mon Mar 05, 2018 12:20 pm

Joined: Thu Sep 25, 2014 8:34 pm
Posts: 26
Post 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
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest

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

Search for:
Jump to:  

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.