Inputs and outputs
Step 8: Section summary of receiving analog data
In this section, you have learned that:
All XBee modules have a set of pins that you can use to connect and configure sensors or
n
actuators.
A sensor is a device that provides a corresponding output as a response to events or changes
n
in quantities. There are two types:
Digital sensors return discrete values such as on/off.
l
Analog sensors can return a wide variety of values such as the temperature of a room.
l
If, as in this example, you want to read data from an analog sensor, you must configure the
n
selected IO as Analog to Digital Converter (ADC).
You can obtain analog data from a sensor by configuring the remote XBee module to transmit
n
the IO data:
To the local device, by setting the DH and DL parameters to the MAC of the receiver
l
module.
Periodically, as you did in this example (using the IR or IO Sampling Rate parameter).
l
Note
Remember that the Digital IO Change Detection (IC) feature only works for digital pins, so in this
case you would not receive any data.
In this case, the data sent from one module to the other is called IO Sample. It contains the
n
inputs (DIO lines or ADC channels) for which sampling has been enabled. It also contains the
value of all enabled digital and analog inputs.
A sleeping end device will transmit periodic IO samples at the IR rate until the Time Before
n
Sleep (ST) timer expires and the device can resume sleeping.
Step 9: Do more with receiving analog data
If you are ready to work more extensively with receiving analog data, try the following:
Instead of using the potentiometer on the board, connect an analog Grove sensor to the board
n
to create a home automation system. You can monitor a number of factors, such as:
Temperature
l
Humidity
l
Luminance
l
CO2
l
UV
l
Gas
l
You can find more analog sensors at SeeedStudio.
Form a larger sensor network by adding more XBee modules and configuring them to send
n
analog data to COORD (XBee A).
How XBee modules control devices
There are many reasons to create a sensor network—that is, to collect data from multiple nodes and
bring it to a central location. There are also many reasons you may want to take remote commands
XBee® Zigbee® Mesh Kit
How XBee modules control devices
119
Need help?
Do you have a question about the XBee Zigbee Mesh Kit and is the answer not in the manual?