I am reading 0 to 10vdc signal, the board is seeing the changes in that range however the read values tend to jump around about ±10% on a given voltage reading. So with a fixed voltage the readings will fluctuate about 10% up and down in each 1second loop.
python3 code:
import smbus
import time
DL = 1
DL1 = 0.5
address = 0x68
bus = smbus.SMBus(1)
while True:
bus.write_byte(address, 0x18)
time.sleep(DL1)
data = bus.read_i2c_block_data(address, 0x00, 2)
raw_adc = (data[0] * 256) + data[1]
print (f"raw data : {data}“)
print (f"read value : {raw_adc}”)
time.sleep(DL1)
here is the output when reading 8vdc signal on port 1
raw data : [57, 185]
read value : 14777
raw data : [58, 118]
read value : 14966
raw data : [59, 87]
read value : 15191
raw data : [55, 79]
read value : 14159
raw data : [53, 175]
read value : 13743
raw data : [54, 66]
read value : 13890
raw data : [57, 131]
read value : 14723
raw data : [58, 72]
read value : 14920
raw data : [59, 138]
read value : 15242
raw data : [55, 130]