I am using ADS1X15 library to read analog data from ADC-1115 adc conver ter. I was successfully using this library as well as module for atleast 2 years.
Now the Python through the error [Errno 121] Remove I/O Error.
What could be the cause of this error?
def inductive_sensor(): global close_application global indu_stop global peak_volt global valley_volt peak_volt = 0 valley_volt = 10 get_adc = False while True: try: ADS = ADS1x15.ADS1115(1, 0x48) ADS.setGain(ADS.PGA_2_048V) ADS.setDataRate(ADS.DR_ADS111X_860) break except: if close_application: break #print ('Inductive Sensor Running...') while not close_application: time.sleep(0.001) val_0 = ADS.readADC_Differential_0_1() volt = ADS.toVoltage(val_0) if volt > peak_volt : peak_volt = volt if volt < valley_volt : valley_volt = volt if maintenance : update_inductive(np.round(volt,3)) indu_stop = True #print ('Inductive Sensor Stopped...') I am getting this Error at the line val_0 = ADS.readADC_Differential_0_1()
When I run my program randomly this error would go. But, after a few minutes the error will be back.