To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 2021
2020  |  2022
Subject: 
Re: NQC SendMessage to legOS successful!
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Tue, 28 Aug 2001 14:43:17 GMT
Viewed: 
3946 times
  
Well, legOS send message to NQC is also successful!
lnp_message_write(msg); is used in legOS.

Zhengrong

In lugnet.robotics.rcx.legos, Zhengrong Zang writes:
> I hacked legOS and make NQC sending standard firmware message to legOS, you
> an see the test legOS and NQC program as below, NQC program send a random
> message and display it, legOS program receives that message and display it.
> But I can't implement legOS send message to NQC, I tried to use
> lnp_logical_write(buf, 9);
> here buf[]={0x55, 0xff, 0x00, 0xf7, 0x08, 0x01, 0xfe, 0xf8, 0x07} for
> message 1, but no message is sent. Does anyone have suggestion?
> 
> Zhengrong
> 
> // msg.c
> int main(int argc, char **argv)
> {
>   unsigned char msg;
>   char t[10];
>   int x, y, z, i;
>   while (1) {
>     msg = lnp_message_read();
>     if (msg) {
>        x = msg / 100; y = (msg - x * 100) / 10;
>        z = msg - x * 100 - y * 10; i = 0;
>        if (x > 0) {
>           t[i] = x + 48; i++;
>        }
>        if (y > 0 || x > 0) {
>           t[i] = y + 48; i++;
>        }
>        t[i] = z + 48; i++; t[i] = 0;
>        cputs(t);
>     }
>     msleep(500);
>   }
>   return 0;
> }
> 
> //msg.nqc
> int msg;
> int x = 0;
> task main()
> {
>  SetUserDisplay(x, 0);
>  while (true) {
>      msg  = Random(254) + 1;
>      x = msg ;
>      SendMessage(msg);
>      Wait(500);
>   }
> }



Message has 1 Reply:
  Re: NQC SendMessage to legOS successful!
 
Congratulations! (...) (25 years ago, 28-Aug-01, to lugnet.robotics.rcx.legos)

Message is in Reply To:
  NQC SendMessage to legOS successful!
 
I hacked legOS and make NQC sending standard firmware message to legOS, you an see the test legOS and NQC program as below, NQC program send a random message and display it, legOS program receives that message and display it. But I can't implement (...) (25 years ago, 28-Aug-01, to lugnet.robotics.rcx.legos)

3 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
    

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR