LEGO Engineering

| | | | | | | |
How do I use the mail command on the RCX?


23rd of April, 2010

(8 )
62% thumbs up 37% thumbs down

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_pic_1.jpg


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.

mail_pic_2.jpg


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

mail_pic_3_1.jpg

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

   :
   :
* :
* :
 


Home | About Us | Contact Us

© 2013 Center for Engineering Educational Outreach, Tufts University
© 2013 The LEGO Group. All rights reserved.