ControlEverythingCommunity / PECMAC

I2C Current Monitoring Controller

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error when set to run continues

rescuemoe opened this issue · comments

Need a little help if anybody out there can help.
I have the code on a loop that runs ever 20 seconds with a pause and write the data out to a CSV file
Every once in a while the loop stops and I get this wonderful error and right before it give me the error I get false readings like 16777.215 when I should get a reading like 0.013
I am running the board that only reads 4 circuits on a rasp pie python version 3.5.3.
Any ideas?
Traceback (most recent call last):
File "READ6.py", line 36, in
data = bus.read_i2c_block_data(0x2A, 0x55, 3)
File "/usr/local/lib/python2.7/dist-packages/smbus_cffi-0.5.1-py2.7-linux-armv7l.egg/smbus/util.py", line 59, in validator
return fn(*args, **kwdefaults)
File "/usr/local/lib/python2.7/dist-packages/smbus_cffi-0.5.1-py2.7-linux-armv7l.egg/smbus/smbus.py", line 258, in read_i2c_block_data
raise IOError(ffi.errno)
IOError: 121