Subject:
|
Re: Two motors at the same time... It is possible?
|
Newsgroups:
|
lugnet.robotics.nxt
|
Date:
|
Mon, 19 Feb 2007 10:34:22 GMT
|
Viewed:
|
14427 times
|
| |
| |
John,
>
> If you want to do these three things for two different motors
> simultaneously you
> can, but at the moment you have to roll your own code to do the job.
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 examples...) , but i found that it does not accept negative values
for the tachoLimit parameter. (The motor does not move at all)
I did not find any mention in the "NXC guide - output module section" for
changing the rotation direction of the motors, although i saw it is possible
to do that using the convenience calls like OnFwd(outputs, pwr) and
OnRev(outputs, pwr). So i can imagine there is a way...
Am I missing something?
----------------------------------------
#include "NXCDefs.h"
task main(){
SetOutput(OUT_A,
OutputMode, OUT_MODE_MOTORON + OUT_MODE_BRAKE,
RegMode, OUT_REGMODE_IDLE,
TachoLimit, -120,
RunState, OUT_RUNSTATE_RUNNING,
Power, 50,
UpdateFlags,
UF_UPDATE_TACHO_LIMIT+UF_UPDATE_SPEED+UF_UPDATE_MODE);
}
----------------------------------------
Thanks again,
Patrick
|
|
Message has 1 Reply:
Message is in Reply To:
| | 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
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
Active threads in NXT programmable brick
|
|
|
|