To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.nxtOpen lugnet.robotics.nxt in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / NXT / 494
493  |  495
Subject: 
Two motors at the same time... It is possible?
Newsgroups: 
lugnet.robotics.nxt
Date: 
Sun, 18 Feb 2007 12:57:56 GMT
Viewed: 
13283 times
  
Hi people,

I was wondering if is possible to run two motors at the same time, using
diferente parameters (speed and degrees)...

The code bellow works, but first the motor A runs, then the motor B runs.

----------------------------
task main(){
     RotateMotor(OUT_A, 50, 360);
     RotateMotor(OUT_B, 100, 180);
}
----------------------------

There is not a kind of multitasking? This code bellow does not even works
(only the motor A runs).:

----------------------------
task MotorA(){
     RotateMotor(OUT_A, 50, 360);
}

task MotorB(){
     RotateMotor(OUT_B, 100, 180);
}

task main(){
     start MotorA;
     start MotorB;
}
----------------------------

Thanks for any help...

Patrick J. Levy
___________________________________________
Omiccron Programação Gráfica Ltda.
11 3288-4832
patrick@omiccron.com.br



Message has 1 Reply:
  Re: Two motors at the same time... It is possible?
 
(...) It is possible. The NXC API doesn't currently wrap this capability in a really simple function. (...) The RotateMotor API function calls a subroutine written in NBC that does not return until the tachometer limit target has been reached. (...) (18 years ago, 19-Feb-07, to lugnet.robotics.nxt)

6 Messages in This Thread:


Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR