Quote:
|
Originally Posted by Texan
Here are a few links:
Packet description: (includes example of sending IR message)
http://graphics.stanford.edu/~kekoa/rcx/protocol.html
From this website, I think that sending:
55 ff 00 f7 08 M ~M C ~C
Where C is the checksum. Sends the message M. One thing I'm confused on is the checksum. It doesn't seem to work the way I read it in his description. Even trying to figure the checksum using his example I didn't come up with the same thing he did. It may be I just don't understand it. If you kow, tell me how to compute it.
Some more stuff on the packets: (not as good)
http://graphics.stanford.edu/~kekoa/rcx/#Protocol
Do you need to know how to send that out, or do you already have that figured out?
--EDIT--
Here is a site with examples of using it in C++. http://www.generation5.org/content/2001/rob08.asp.
Reading that, it's a great site. 
|
The example from LUGNET was made for MSCOMM and VB. I just took the array and wrote the functions for the controller.
A message packet is only one additional info section.
Header (3 bytes)
OpCode (2)
Message (Info, 2)
Checksum (2)
The OpCode for Message is 0xF7. It has one argument: the message value. Every data byte is followed by it's not. So you get:
Header = 55FF00
OpCode = F708
Message = M ~M
CheckSum = (F7+M) & FF
I think we're finally getting it!
The second link is extremely helpful. And I'm glad to know about the Null-modem cable thing: The LIRT is CTE, not a CSE (it
is a male, like your computer), so maybe a standard cable works!