I have a program that is meant to read data:
import pigpio pi = pigpio.pi() if not pi.connected: exit() h = pi.i2c_open(1, 0x5a) c, data = pi.i2c_read_device(h,0x09) print(data) pi.i2c_close(h) pi.stop()
When I try and run it, I get data but it crashes when it tries to run
The error message is:
Exception in thread Thread-1 (most likely raised during interpreter shutdown): Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner File "/usr/lib/python2.7/dist-packages/pigpio.py", line 1106, in run File "/usr/lib/python2.7/dist-packages/pigpio.py", line 977, in _pigpio_command <type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'send'