| | Two motors at the same time... It is possible?
|
|
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, (...) (18 years ago, 18-Feb-07, to lugnet.robotics.nxt)
|
|
| | 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)
|
|
| | Re: Two motors at the same time... It is possible?
|
|
John, (...) It worked just as I expected. The two motors now are rotating the same time. Thanks to your example, now I am giving some time to understand this setOutput call, and reading all the documentation (it is quite easier with pratical (...) (18 years ago, 19-Feb-07, to lugnet.robotics.nxt)
|
|
| | Re: Two motors at the same time... It is possible?
|
|
(...) Hi Patrick, Indeed the Tacholimit can only be positive. But power can be negative, that's the way to reverse direction. Philo (18 years ago, 19-Feb-07, to lugnet.robotics.nxt)
|
|
| | Re: Two motors at the same time... It is possible?
|
|
(...) Yes, Now it is perfect. Not so obvious i think... Thanks! Patrick (18 years ago, 19-Feb-07, to lugnet.robotics.nxt)
|
|
| | Re: Two motors at the same time... It is possible?
|
|
The code is working right well! But i think the stall control at the end o each task has no meaning there, since the until loop does not let the script reach it if the motor become staled. (...) Patrick (18 years ago, 19-Feb-07, to lugnet.robotics.nxt)
|