Synchronized Motors
Page 1 of 1

Author:  Palione [ Tue Jul 02, 2013 6:51 am ]
Post subject:  Synchronized Motors

I've been working thru the curriculum and got stuck here
RobotC Curriculum for TETRIX & LEGO MINDSTORMS>Movement>Improved Movement>Motor Synchronization
I copied and loaded this program and when I ran it the robot went in a CCW circle instead of straight.

task main()
nSyncedMotors = synchBC;
nSyncedTurnRatio = 100;

motor[motorB] = 50;


LabyrinthSynch.c [1.05 KiB]
Downloaded 511 times

Author:  rcahoon [ Tue Jul 02, 2013 12:50 pm ]
Post subject:  Re: Synchronized Motors

Hi Palione,
Assuming you're using Robot Virtual Worlds, I suspect this is the problem:

JohnWatson wrote:
A couple of things for reference:

nMotorEncoderTarget and nSyncedMotors currently will not work in Robot Virtual Worlds; this is because they depend on values generated by the NXT brick that are not yet emulated by Robot Virtual Worlds. However, the nMotorEncoder command does work and can be used to move the motors a set distance with precision.

We have a video trainer curriculum dedicated to the nMotorEncoder/nMotorEncoderTarget functions that you can view as a refresher; it is under the 'Movement -> Improved Movement -> Target Distance' section. We also have a rundown of the NXT Motor Functions on our wiki that can also be used as a quick reference guide.


Author:  Palione [ Tue Jul 02, 2013 1:31 pm ]
Post subject:  Re: Synchronized Motors

Thanks Ryan.
Yes I was using RVW.
I'll try it with a physical Lego robot to see how it works.
Aloha, Palione

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group