|Page 1 of 1|
|Author:||44tom44 [ Sun Jan 13, 2013 11:09 pm ]|
|Post subject:||Autonmous Question|
Would someone be able to take a look at my code? For some reason in autonomous, it will just keep going straight when I do a forward motion w/encoders and run in a continuous loop. Whenever I do a turning motion, it does fine and stops where needed. Not sure why it "freezes" when it goes straight.
|Author:||MHTS [ Sun Jan 13, 2013 11:32 pm ]|
|Post subject:||Re: Autonmous Question|
Is this code supposed to be going straight or turning?
If that's supposed to go straight, then you should correct the motor polarity by adding "reversed" to the leftDrive motor pragma and change the -50 value to 50 instead. What happened was that your left motor encoder is decreasing and your right motor encoder is increasing and when you add them together they cancel each other out so the summed value is probably not going up. So the code will run forever.
|Page 1 of 1||All times are UTC - 5 hours [ DST ]|
|Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group