Subject:
|
Re: Q: Multitasking, and reacting to sensors
|
Newsgroups:
|
lugnet.robotics.rcx.nqc
|
Date:
|
Tue, 6 Feb 2001 21:08:36 GMT
|
Viewed:
|
2083 times
|
| |
| |
Tobias Möller <tobias.moller@telia.com> writes:
>
> I'm building a robotic arm (that's why I chose to reply to this message,
> not the other, later ones) that I plan to program in NQC.
Jag redan såg den, jag läser lugnet.loc.se :-)
> It does not need multitasking to work, or does it?
No, not if you do everything in sequence.
I'd try this first, because it is simpler.
> It's only going to pick something up, then rotate around,
> put it down etc. And it will use 2 RCX's as well.
Then it is always multitasking, one task on each RCX.
> The only multitasking thing I could think of would be
> to have one task that moved the arm, and one task that checked light
> values from the light sensor near the claw.
You can make one task for each motor of the robot.
Then have a variable for commands to this task
(write a value to give it's target position)
and one variable that tell's when it is there/where it is,
so that your main task can wait.
This way you can run start all motors at once
and your robot will be faster.
With two RCX maybe tasks for communication are also good.
Jürgen
--
Jürgen Stuber <stuber@loria.fr>
http://www.loria.fr/~stuber/
|
|
Message is in Reply To:
| | Re: Q: Multitasking, and reacting to sensors
|
| Thanks for the replies, and for the sample programs. I'll try them out soon. I'm building a robotic arm (that's why I chose to reply to this message, not the other, later ones) that I plan to program in NQC. It does not need multitasking to work, or (...) (24 years ago, 6-Feb-01, to lugnet.robotics.rcx.nqc)
|
9 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|