Is there a way to turn on two different color lamps (different ports) at the same time?
Even using parallel beams, there is a delay between the main beam and the branch.
NXT-G - Simultaneous Action
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
Re: NXT-G - Simultaneous Action
The NXT cann't do true multitasking. It only can do one thing at a time. The FW is setup to switch between tasks fairly quickly and easily. However, it takes quite a while for the color sensor to change color modes (I don't remember the exact numbers, but I think it's something like 150-200ms). Even running in multiple tasks, I don't think you can improve the overall time.
Edit: just a guess, but the FW code that runs the color sensor is likely shared among all sensor ports (can only be accessed one at a time). If this is the case, it would have to completely finish with one before sending commands to another.
Edit: just a guess, but the FW code that runs the color sensor is likely shared among all sensor ports (can only be accessed one at a time). If this is the case, it would have to completely finish with one before sending commands to another.
Matt
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
Re: NXT-G - Simultaneous Action
I'm assuming the "turn light on" code has a
You could also make a "turn light on" block of your own.
wait
statement internally. Try upgrading your brick to the NBC/NXC Enhanced Firmware - then the wait statement will simply rotate the task queue instead of freezing your code, and the other beam will run while the main beam continues to wait in the background.You could also make a "turn light on" block of your own.
Commit to LEGO Mindstorms Robotics Stack Exchange:
bit.ly/MindstormsSE
Commit to LEGO Stack Exchange: bit.ly/Area51LEGOcommit
Who is online
Users browsing this forum: Semrush [Bot] and 1 guest