Shop OBEX P1 Docs P2 Docs Learn Events
Sending data to another propeller using Xbee — Parallax Forums

Sending data to another propeller using Xbee

I need to send two values from one Propeller to another using XBees. Can any one give me an efficient way of doing this with some sample code using Simple C?

Thanks!
-Blake

Comments

  • Found this on the parallax website tutorials

    it should help
  • XBee in its simplest form is just serial, but it's not reliable, so you'll need some sort of packet format with a crc or checksum so you can verify you got the data properly - they tend to drop bytes.
  • ElectrodudeElectrodude Posts: 1,657
    edited 2016-04-29 06:11
    Instead of inventing your own packet format, you might as well use the packet format that XBees have built-in, which is called API mode. That way, you won't need to worry about resending and checking data as much - XBees in API mode automatically resend bad packets and won't give you bad or incomplete packets. I used serial mode for XBees and later upgraded to API mode, and found it much more reliable.

    A Spin XBee API object can be found here: http://obex.parallax.com/object/674

    I have a modified version for use with FullDuplexSerial4port: http://obex.parallax.com/object/763
Sign In or Register to comment.