Commit 5299d8de authored by Ivan Tyagov's avatar Ivan Tyagov

Failed to communicate over I2C - retry until successfull , debug later.

parent 9f09b5c2
...@@ -89,11 +89,12 @@ def sendI2Ccommand(code): ...@@ -89,11 +89,12 @@ def sendI2Ccommand(code):
# init I2C # init I2C
i2c.init("/dev/i2c-1") i2c.init("/dev/i2c-1")
i2c.open(0x58) i2c.open(0x58)
while 1:
try: try:
i2c.write([0x10, code]) i2c.write([0x10, code])
except: break
print("Failed co sent command.") except:
print("Failed co sent command.")
i2c.close() i2c.close()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment