Commit 4939ec20 authored by Ivan Tyagov's avatar Ivan Tyagov

Switchon / off for a day (stupid test to check relays work.

parent 8ba4ae28
...@@ -83,13 +83,17 @@ import time ...@@ -83,13 +83,17 @@ import time
i2c.init("/dev/i2c-1") i2c.init("/dev/i2c-1")
i2c.open(0x58) i2c.open(0x58)
# switch ON RELAY1
i2c.write([0x10, 0x01])
for i in range(0, 25): for i in range(0, 30*60*24):
# switch ON RELAY1
i2c.write([0x10, 0x01])
print("On")
time.sleep(2)
print("Off")
# switch OFF RELAY1 # switch OFF RELAY1
i2c.write([0x10, 0x00]) i2c.write([0x10, 0x00])
time.sleep(2)
# switch ON RELAY1
i2c.write([0x10, 0x01])
time.sleep(1)
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