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
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