bh3a-Icetruck-Challenge-1-3/Pi-py-Code/gasventile.py

18 lines
396 B
Python
Raw Normal View History

2024-06-27 11:14:28 +02:00
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)