I am using Series 1 XBees, modem type XB24, function set: XBEE 802.15.4 and version 10EC. At the moment, the coordinator is receiving API packets every 20ms, however, no matter how I press the buttons connected to End Device 1, the incoming API packets stay the same. So I am not sure where the problem is. Are my configuration settings off? Did I miss something? Did I miss connect the button?
The button connection looks good. You can verify by measuring the AD0 pin with a Voltmeter, should be 3.3V when button not pushed & 0V when button pushed.
Is the correct End Device address in the received API packets?
Is the correct address of the coordinator set in the End Devices? ATDH should be 32 bits.
Is the IOC enabled in the End Devices (ATIC)? This sends the input pin data when it changes.
Are the Pins that the button connected to set as Inputs? Yes it is (ATD0 = 3)
You could try a slower ‘sample rate’ (ATIR) so not to ‘flood’ the coordinator. In fact, with IOC enabled there doesn’t need to be any sampling since the data will be sent on detection of a button press/release.
Baud rate is 115k but seems you are not having issues as other have had.
the setup of the XBee S1 for virtual wire is a bit complicated if you’ve not done it previously.
If all you have is a push button, you could config it to use a digital I/O pin rather than an A/D. Simpler.
I’d suggest, at first, not using 115200 baud because the S1’s don’t match 115200 to better than 1.5%. It’s because the 8MHz crystal in the XBee isn’t a multiple of that baud rate and there’s no fractional divider.
The 64 bit Address is on the tag that is on the XBee module. This is split into two 32 bit values as SH and SL, the high and low orders. This should be matched by a remote XBee in its DH and DL registers.
Good on the 9600Baud just to ensure no problems.
I would have the Coordinator connected to a Com port on your PC. Then use X-CTU or a Python program to receive and view data packets. API packets can be a little tricky to understand at first. But by studing the packet contents and comparing to the XBeee Document they can be decoded and understood.