User`s guide
XBee Analog I/O Adapter
26
Data retrieval
To retrieve measurement data from the XBee Analog I/O Adapter, use
these Python modules, provided in the XBee Adapter Libraries:
• xbeeain.py: Issues the AT IS command to retrieve the data.
• sensor_io.py: Decodes the output of the AT IS command.
Byte structure returned by IS command
The AT IS (Force Sample) command is used to force a read of all enabled
analog I/O lines. The command returns a byte structure that identifies
which lines are enabled for digital or analog sampling, and the current
measurement.
Number of samples
The number of samples in this reading. Should always be 0x01.
Byte size Purpose
1 The number of samples in this message.
2 Bitmask of which digital I/O lines are enabled for this sample.
1 Bitmask of which analog I/O lines are enabled for this sample.
2 Digital sample, only present if any digital I/O lines are
enabled.
2 * N Analog sample, N is the number of analog I/O lines enabled.