Create Toggle_fan.py
This commit is contained in:
parent
f75fb0a198
commit
3f0e17ade1
16
Toggle_fan.py
Normal file
16
Toggle_fan.py
Normal 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()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue