|Distance and Turning in Robot C
|Page 1 of 1|
|Author:||rail33 [ Sat May 17, 2008 4:15 pm ]|
|Post subject:||Distance and Turning in Robot C|
I'm new to programming and new to RobotC.
In programming turns, I'm using "movement duration" instead of a specific degree of turn. Here's an example of how I'm programming a turn:
nSyncedMotors = synchBC;
nSyncedTurnRatio = -100;
motor[motorB] = 50;
How can I program turns using degrees instead of motor duration?
|Author:||starwarslegokid [ Sat May 17, 2008 6:45 pm ]|
To do this you have to use the built in rotation sensor in the motor, called the encoder. Here is some sample code that shows you how to set up a motor encoder target, let me know if this helps B-).
|Page 1 of 1||All times are UTC - 5 hours [ DST ]|
|Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group