Knowledgebase Home | Contact Knowledgebase Home | Contact
Search the Knowledgebase Browse by Category
How do I use the mail command on the RCX?

The RCX is always ready to receive mail which means that all you need to do to send a mail value is to wire in the send mail icon which can be found under RCX communications.  The code below makes the RCX send a mail value of 85:





Mail values can only be 0-255, and only one number can be held in the mailbox at once.  Below is a program for a remote-control car that demonstrates the use of mail values. The program sends a mail value based upon how many touch sensors are depressed.






This program looks at the incoming mail and uses its value to decide which motors to turn on.






The RCX cannot both send and receive mail at the same time, which means for two way RCX communication some sort of handshake protocol must be established.  A good way to do this is to have the RCX transmit for a certain period of time then wait for mail for a certain period of time.

Note: this feature does not work on the NXT.





ses

Visitor Comments
No visitor comments posted. Post a comment
Related Questions
No related questions were found.
Attachments
No attachments were found.

Powered by ActiveKB Knowledgebase Software