I’m hoping someone can offer some guidance. Using the attached codes I have successfully programmed two devices to act as transmitter and receiver, sending and receiving a simple code and illuminating an LED. I have expanded this to accept commands, from two separate buttons, illuminating separate LEDs. Fine. BUT, I want to expand further and have come up against a problem. Please refer to TRANSMIT CODE line 18 and RECEIVE CODE line 20.
TRANSMIT: 18 SentMessage = 111;
RECEIVE: if (ReceivedMessage == 111) // Indicates switch is pressed
The setup works fine when the messages are either 111, or 222 for both transmitter and receiver, but will not work for 333, 444, etc.
This obviously greatly limits expanding the functionality of the devices. Can anyone explain this and advise how to get around this problem? Thanks in advance.
tx-rx_Codes_brainybits.txt (2.3 KB)