Home/Support/Support Forum/Sensor data from multiple ADCs
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Sensor data from multiple ADCs

0 votes
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
asked Jan 2 in 3rd Party Python and API development in other Languages by Martin91 New to the Community (20 points)

Please log in or register to answer this question.

1 Answer

0 votes
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
answered Jan 4 by NicholasYourIoT Seasoned Professional (232 points)
...