Lightfoot
06-02-2010, 03:43 PM
I am attempting to use the API mode so I can transmit data to particular XBEES (a total of six on the network). The object I think makes you build a packet before you send it (hard to tell just by looking at the code). I for now just want to transmit and receive single bytes. In the future I will want packets of multiple bytes. Can you post examples of how to properly send API data and retrieve it at the other end? I set the 16 bit source addresses from 1 to 6, 0 is the transmitter unit. I tried this code, but I think you have to build a packet, as the object probably does not do this automatically:
'Transmitter:
XB.API_Tx(1,5) 'Transmit 5 to XBEE address 1.
'Receiver:
repeat
outa[8..15] := XB.API_Rx 'Set LEDs to received data.
Thanks
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
'Transmitter:
XB.API_Tx(1,5) 'Transmit 5 to XBEE address 1.
'Receiver:
repeat
outa[8..15] := XB.API_Rx 'Set LEDs to received data.
Thanks
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔