示例#1
0
from rpi_greenhouse import GreenhouseIndicator
from time import sleep

indicator = GreenhouseIndicator()

colours = ['white', 'red', 'blue', 'green']

while True:
    for index in range(3):
        for colour in colours:
            indicator.turn_leds_on(colour, index)
            print("%s #%i on" % (colour, index))
            sleep(0.1)
            indicator.turn_leds_off(colour, index)
from rpi_greenhouse import GreenhouseIndicator
from time import sleep

indicator = GreenhouseIndicator()

while True:
    for index in range(3):
        indicator.turn_leds_on(index=index)
        print("#%i on" % index)
        sleep(0.5)
        indicator.turn_leds_off(index=index)
from rpi_greenhouse import GreenhouseIndicator
from time import sleep

indicator = GreenhouseIndicator()

colours = indicator.LED_COLOURS

while True:
    for colour in colours:
        print("%s leds on" % colour)
        indicator.turn_leds_on(colour)
        sleep(0.5)
        indicator.turn_leds_off(colour)
示例#4
0
from rpi_greenhouse import GreenhouseIndicator
from time import sleep

indicator = GreenhouseIndicator()

while True:
    print("All on")
    indicator.turn_leds_on()
    sleep(0.5)
    print("All off")
    indicator.turn_leds_off()
    sleep(0.5)