Create Toggle_fan.py

This commit is contained in:
tpollina 2019-12-10 12:58:07 -08:00 committed by GitHub
parent f75fb0a198
commit 3f0e17ade1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

16
Toggle_fan.py Normal file
View file

@ -0,0 +1,16 @@
#!/usr/bin/python
import smbus
from time import sleep
bus = smbus.SMBus(1)
DEVICE_ADDRESS = 0x0d
def fan_toggle():
bus.write_byte_data(DEVICE_ADDRESS, 0x08, 0x01)
fan_toggle()