Subject:
|
Re: K, haven't had this much LEGO fun in a while...
|
Newsgroups:
|
lugnet.org.ca.rtltoronto
|
Date:
|
Wed, 14 Jun 2006 16:17:45 GMT
|
Viewed:
|
1467 times
|
| |
| |
In lugnet.org.ca.rtltoronto, Chris Magno wrote:
<snip>
>
>
> Im not a programmer, nor do i play one on TV.
>
> but, why dont you have a "send signal" task, and have it que up the
> signals you want it to send.
>
> if thats to complex, use a "send signal" task to send, and have it
> toggle a flag when its ready to send again. and have your separate tasks
> look for the flag ?
I could use a semaphore, but then I'm using it for every signal sent. This may
cause issues. For example, if train A passes the light sensor and is suppose to
stop, but train B has 'grabbed' the transmission via semaphore (or even queue,
then train A will proceed merrily past the light sensor until the queue gets to
stopping it or the semaphore is released. By then the train could be way down
the track.
Though, workign with the microseconds in programming language vs. the seconds of
travel, that may not lead to much.
I'll give it a shot.
Thanks, Christopher.
>
> now, where are those rocks, I need to try to make fire and something round.
>
> Chris
> why no pinch?
|
|
Message is in Reply To:
13 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|