robert-hh / ads1x15

Micropython driver for ADS1115 and ADS1015
90 stars 25 forks source link

OSError: [Errno 5] EIO #10

Open Omid888 opened 3 weeks ago

Omid888 commented 3 weeks ago
Traceback (most recent call last):
  File "<stdin>", line 17, in <module>
  File "module__read_from_sensors.py", line 34, in read_from_sensors
  File "drivers/ads1x15.py", line 164, in read
  File "drivers/ads1x15.py", line 142, in _read_register
OSError: [Errno 5] EIO

After working for a few minutes (with different voltages) this message appears & the microcontroller hangs. Any suggestions?

microcontroller: Raspberrypi Pico micropython version: 1.23.0

robert-hh commented 3 weeks ago

OSError: [Errno 5] EIO usually points at a wiring problem of the I2C bus. Are proper pull-up resistors in place? Is GND connected? Do you use proper short wires? I2C is not meant for long wires. If your connection wires are long (>30cm), reduce the value of the pull-up resistors. You can go down to like 220 Ohm.