View unanswered posts | View active topics It is currently Fri Oct 30, 2020 6:30 am

Reply to topic  [ 3 posts ] 
Synchronized Motors 
Author Message

Joined: Sat Jun 15, 2013 7:00 am
Posts: 12
Post 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 512 times
Tue Jul 02, 2013 6:51 am
Site Admin
Site Admin
User avatar

Joined: Tue Oct 09, 2012 10:34 am
Posts: 192
Post 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.


Ryan Cahoon
CMU Robotics Academy
RVW Software Developer

Robot Potato Head; Virtual NXT

Tue Jul 02, 2013 12:50 pm

Joined: Sat Jun 15, 2013 7:00 am
Posts: 12
Post 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

Tue Jul 02, 2013 1:31 pm
Display posts from previous:  Sort by  
Reply to topic   [ 3 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.