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

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

parent 9f09b5c2
...@@ -89,9 +89,10 @@ def sendI2Ccommand(code): ...@@ -89,9 +89,10 @@ 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])
break
except: except:
print("Failed co sent command.") print("Failed co sent command.")
......
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