Hello!
I know there are a lot of topics on XBees, but I'm having trouble with the system I have set up. All the components I'm using are from the SparkFun XBee Wireless Kit using XBees Series 1. Basically, I'm trying to get one XBee connected to an Arduino, to read analog data coming from another XBee, connected to a light resistor.
Here is the setup:
XBee 1 is configured to be API enabled. This is connected to an XBee Shield on DLINE mode, connected to to the Arduino, connected to my mac laptop.
XBee 2 is configured so that D3 (pin d3 on the XBee is connected to an LDR) has an analog input: AD2. I also set the IR Sample Rate to: 3A98. This is not API enabled. The XBee is connected to an XBee Explorer USB, on a breadboard connected to an LDR and powered via usb by my mac.
Both XBees are configured to have the same Pan ID, with their Source IDs set and their Destination IDs set to each other.
Attached is the code that I've uploaded to the Arduino, which should essentially read the data packets coming in from XBee 2 and prints out incoming analog data to serial. The code uses the XBee Arduino Library by Andrew Wrapp.
Trouble is when I turn both XBees on and look at the serial monitor for XBee 1, I get this message, "Expected I/O Sample, but got 83." I don't know if the XBees are even talking to each other, or what the message means. I hope this makes sense. Can anyone help?
P.S.
All the documentation I'm finding for Analog Data from Remote XBees sensors are from 2011 and use XBee Series 2, or don't use the Arduino XBee Shield at all.
c_Arduino_XBee.ino (2.45 KB)