NXC - How to Mirror or Reflect Synced Motors ??

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
Post Reply
b-trueman
Posts: 2
Joined: 02 Jul 2013, 17:59

NXC - How to Mirror or Reflect Synced Motors ??

Post by b-trueman »

Hi,
I'm a newbie to NXC and I'm looking for some advice on how to sync 2 motors that operate "mirrored".
For example; motor 1 rotates from 0 to 180 degrees in sync with motor 2 that rotates back from 180 to 0 degrees.

I noticed that RobotC has a "reflected" or "mirrored" motor control option, but I can't seem to find similar methods using NXC.

Your guidance would be appreciated.

cheers, Brian
felix2ch
Posts: 33
Joined: 11 Jun 2013, 16:46

Re: NXC - How to Mirror or Reflect Synced Motors ??

Post by felix2ch »

You can use RotateMotorEx OnRevSync OnFwdSync etc...
And set turnpct to 100 or -100.
b-trueman
Posts: 2
Joined: 02 Jul 2013, 17:59

Re: NXC - How to Mirror or Reflect Synced Motors ??

Post by b-trueman »

thanks !! I'll check those out
Brian
Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 0 guests