示例#1
0
def turn_off_air():
    if hardware.relay_state(hardware.AIRGPIO) == 1:
        hardware.relay(hardware.AIRGPIO, 0)
        print("Turned off the airpump now")
示例#2
0
def turn_on_filter():
    if hardware.relay_state(hardware.FLTGPIO) == 0:
        hardware.relay(hardware.FLTGPIO, 1)
        print("turned on the filter")
示例#3
0
def turn_on_air():
    if hardware.relay_state(hardware.AIRGPIO) == 0:
        hardware.relay(hardware.AIRGPIO, 1)
        print("turned on the airpump")
示例#4
0
def turn_off_led():
    if hardware.relay_state(hardware.LEDGPIO) == 1:
        hardware.relay(hardware.LEDGPIO, 0)
        print("Turned off the LED now")
示例#5
0
def turn_on_led():
    if hardware.relay_state(hardware.LEDGPIO) == 0:
        hardware.relay(hardware.LEDGPIO, 1)
        print("Turned on the LED now")
示例#6
0
def turn_off_feeder():
    if hardware.relay_state(hardware.FEEDGPIO) == 1:
        hardware.relay(hardware.FEEDGPIO, 0)
        print("Turned off the feeder now")
示例#7
0
def turn_on_feeder():
    if hardware.relay_state(hardware.FEEDGPIO) == 0:
        hardware.relay(hardware.FEEDGPIO, 1)
        print("Turned on the feeder now")