18 lines
396 B
Python
18 lines
396 B
Python
|
import time
|
||
|
from smbus import SMBus
|
||
|
|
||
|
addr = 0x8 # bus address
|
||
|
bus = SMBus(1) # indicates /dev/ic2-1
|
||
|
|
||
|
def gasventile(zeit):
|
||
|
bus.write_byte(addr, 86) # send V
|
||
|
time.sleep(zeit)
|
||
|
bus.write_byte(addr, 118) # send v
|
||
|
time.sleep(0.1)
|
||
|
|
||
|
if __name__ == "__main__":
|
||
|
gasventile(15);
|
||
|
print("Gas Ventile opend 1s")
|
||
|
# Tur Fan on
|
||
|
time.sleep(1)
|