CuAuPro / ads8688-python

Python driver for ADS8688.
0 stars 0 forks source link

Read fine CH0 to CH3, but wrong from CH4 to CH7 #1

Open appsion opened 1 month ago

appsion commented 1 month ago

Hello, I'm trying to fix this problem but I can see the solution. Do you have any idea why the readings from CH4 to CH7 are wrong?

This is the code: ##################################################################################### import wiringpi as wp import time from drivers import ads8688

wiringpi.wiringPiSetup() # For sequential pin numbering

adc = ads8688.ADS8688(bus=0, device=1, cs_pin=10, freq=1000000) adc.reset() # reset adc.setGlobalRange(ads8688.R0) # set range for all channels

while True:

for i in range(8):

    val = adc.manualChannel(i)
    #time.sleep(.1)
    val = adc.noOp()
    val = round(adc.raw2volt(val, ads8688.R0),4)

    print("Manual CH{}: {}".format(i,val))

################################################################

I tested every channel one by one and the result is the same. The raspberry is version 4, 4 GB.

just for your information I tested the circuit with arduino and works fine.

Can you help me??? Thanks in advanced!

CuAuPro commented 1 month ago

Hello! I am sorry for late response.

Unfortunately, I cannot test that on RPI as I currently do not have one. This library was written for OPi Zero 2. Did you check that pinout is correct?