# Sensor data from multiple ADCs

**URL:** <https://forums.digi.com/t/sensor-data-from-multiple-adcs/22886>\
**Category:** Python\
**Tags:** xbee\
**Created:** [January 2, 2022, 6:04am UTC](https://forums.digi.com/t/sensor-data-from-multiple-adcs/22886 "2022-01-02T06:04:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Martin91](https://avatars.discourse-cdn.com/v4/letter/m/a88e57/32.png) [@Martin91](https://forums.digi.com/u/Martin91)\
**Post date:** [January 2, 2022, 6:04am UTC](https://forums.digi.com/t/sensor-data-from-multiple-adcs/22886/1 "2022-01-02T06:04:33Z")

</div>

Hi, I use this code to receive data from sensors from one xbox to another, remotely.  
But I can only collect data through one ADC, how can I get data from sensors from multiple ADCs simultaneously ?

[https://github.com/digidotcom/xbee-python/blob/master/examples/io/RemoteADCSample/RemoteADCSample.py](https://github.com/digidotcom/xbee-python/blob/master/examples/io/RemoteADCSample/RemoteADCSample.py)

---

<div class="post-metadata">

**Author:** ![NicholasYourIoT](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.digi.com/nicholasyouriot/32/27_2.png) [@NicholasYourIoT](https://forums.digi.com/u/NicholasYourIoT)\
**Post date:** [January 4, 2022, 8:14am UTC](https://forums.digi.com/t/sensor-data-from-multiple-adcs/22886/2 "2022-01-04T08:14:03Z")

</div>

Hi Martin,

This is only an example but you can see on line 27 that the IO that is being read is DIO1\_AD1 and is defined as variable IOLINE\_IN.

From here it is being configured on line 50 and used in the function read\_adc\_task() on line 52 particularly 55 and 56.

If it were I, I would start by changing the variable on line 27 to a list and then putting line 50 and the 55-58 into a separate for loops to iterate the list. Add an extra sleep at the end of each loop for about 0.2 to let the XBee respond.

It looks like the example is only designed to work with 2 XBees, a local and remote and will need additional changes if you have more than 1 remote end point.

Nicholas Wilson  
Your IoT  
[https://www.YourIoT.com.au](https://www.YourIoT.com.au)
