Re: New NQC API for RCX-Spybot or RCX-RC communication

"Gabriel Petrut" <[email protected]>
Newsgroups gmane.comp.hardware.lego.robotics
Organization None
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.