Attempting to read values from ADS1115 channels 2, 3, and 4. Channel 1 value is returned for all 4 channels. I discovered it works with ads1x15 version but not circuitpython version of input.
I found channel 0 was hard coded in the measure function. Changed it to the local variable "channel" and it works fine now.
Both files in .../inputs need the fix -
ads1015_circuitpython.py
ads1115_circuitpython.py
Go down to line 154 -
chan = self.analog_in(self.adc, self.ads.P0)
change to use the channel variable rather than P0
chan = self.analog_in(self.adc, channel)
Describe the problem/bug
Attempting to read values from ADS1115 channels 2, 3, and 4. Channel 1 value is returned for all 4 channels. I discovered it works with ads1x15 version but not circuitpython version of input.
I found channel 0 was hard coded in the measure function. Changed it to the local variable "channel" and it works fine now.
Both files in .../inputs need the fix - ads1015_circuitpython.py ads1115_circuitpython.py
Go down to line 154 - chan = self.analog_in(self.adc, self.ads.P0) change to use the channel variable rather than P0 chan = self.analog_in(self.adc, channel)
Versions: