Hw to run 2 servo motor at different speed in single command

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
Post Reply
vinodkumarj
Posts: 1
Joined: 20 Sep 2011, 14:43

Hw to run 2 servo motor at different speed in single command

Post by vinodkumarj »

Hi,
I am new to NXC. I would like to give different speed to 2 different motor in a single command. I could see in OnFwd command in the help. Where it says "If you use a variable and want to control multiple outputs in a single call you need to use a byte array rather than a byte and store the output port values in the byte array before passing it into this function". I am not able to use a array in the program. Kindly someone through some light on this.
Thanks in advance,
afanofosc
Site Admin
Posts: 1256
Joined: 26 Sep 2010, 19:36
Location: Nashville, TN
Contact:

Re: Hw to run 2 servo motor at different speed in single command

Post by afanofosc »

So why do you want to run 2 motors at different speeds in a single command? Why not just use 2 commands to run 2 motors at different speeds? As far as I know, the firmware does not support setting 2 different speed values for 2 different motors in a single operation.

John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests