I have been trying to program my Xbee s2b to read data from an input (switch on-off) and then generate a message with a payload 01 10 or 01 20 depending on the switch state.
A second xbee S2B is supposed to receive the message and analyze the payload:
If the payload is 01 10 –> switch diode1 on
If the payload is 01 20 –> switch diode2 on
I tried to use the RF handler but I could only receive the message on the second xbee but not analyze it.
Could you please help me on knowing which is the xbee function to read the payload and if I should increment the operation each time I receive a packet?