Subject:
|
Re: more networking questions
|
Newsgroups:
|
lugnet.robotics.rcx.legos
|
Date:
|
Fri, 26 Nov 1999 21:15:25 GMT
|
Viewed:
|
1119 times
|
| |
| |
On Fri, 26 Nov 1999, michael yates wrote:
> Will the lnp task which is doing the receiving only wake up the next layer up
> if the message is properly formed. Currently here is my program
Your msg is propably not well formed enough. Just fetch a copy of
nqc_src_1.2 or higher (unix, mac and lesser OS-es available)
and you end up with a command
./nqc -msg XXX
where XXX is a magic number :-) Which translates to a valid msg.
If you are trying to do simple things; nqc is quite neat too (and the mac
version is simply great :-)
In nqc the a programme to make it beep on any message to would look
something like:
task commu {
ClearMessage();
while ( true ) {
s = Message();
if (s == my_id)
PlaySound(1);
if (s == 3)
SendMessage(3);
// switch ourselves off.
if (s == 2)
StopAllTasks();
}
}
task main {
..(LEFT + RIGHT);
....
I usually use this so that I can send a msg '2' to the robot when it runs
out of control so I do not have to hunt the green stop button :-)
Dw
--
iBook and Legomindstorms... just means you can sit on the ground and not
be seen with corperate junk.
|
|
Message is in Reply To:
| | more networking questions
|
| Will the lnp task which is doing the receiving only wake up the next layer up if the message is properly formed. Currently here is my program -- start of longish bit of code -- #include <conio.h> #include <unistd.h> #include <dsensor.h> #include (...) (25 years ago, 26-Nov-99, to lugnet.robotics.rcx.legos)
|
2 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|