|
In lugnet.robotics, John Hansen wrote:
> In lugnet.robotics, John Hansen wrote:
> > Recently I happened across the MindScript headers for the RCX in the SDK and saw
> > some interesting macros for RCX communication. I decided to port them to NQC
> > and possibly add them to the official built-in NQC API. I would be extremely
> > grateful if someone out there would be willing to try out some of the functions
>
>
> I forgot to include a few #defines:
>
> #define SERIAL_PACKET_RC 0 // default
> #define SERIAL_PACKET_SPYBOT 0
>
> #define SERIAL_COMM_RC 7 // 4800/76KHZ/25%
> #define SERIAL_COMM_SPYBOT 7 // was SERIAL_COMM_4800 + SERIAL_COMM_76KHZ
>
> The RC function, by the way, is essentially identical to the code posted a long
> time ago regarding how to communicate with the MANAS motor unit using NQC.
>
> I'm not sure whether the Spybot functions are working. For one thing, the
> previous Ping function (SendSpybotPing) is known to have worked in its original
> version but I was using a different value for SERIAL_COMM_SPYBOT (3 rather than
> 7). The MindScript macros definitely use 7 but it is not outside the realm of
> possibility that they are incorrect.
>
> I'm trying to sort it all out but if anyone else out there would like to help
> that would be great.
>
> John Hansen
John, I have a few beginner questions for you. I am trying to emulate the
infrared protocol on a different microcontroller. I want it to be able to be
controlled by a Lego remote and to send/receive messages to Lego devices. What
format does the Lego Remote protocol has? My microcontroller can do a standard
protocol like 8 bit command followed by 8 bit device. Is this close enough? The
device is the RCX, Spybot, Remote, etc. and the command is 01 to 99 or whatever
else? Is there a list of commands and device codes that I can use?
Thanks for your patience, the result of this study will be posted soon.
Gabriel
|
|
Message has 1 Reply: | | Re: New NQC API for RCX-Spybot or RCX-RC communication
|
| Hi Gabriel, (...) the format is 38kHz or 76kHz modulated infrared, with a standard 2400 baud serial format of 1 start bit, 8 data bits, odd parity, 1 stop bit (modulated infrared on = 0, off = 1). The packet format consists of a start byte 0x55, (...) (19 years ago, 29-May-05, to lugnet.robotics)
|
Message is in Reply To:
4 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
|
|
|
|