Exemplo n.º 1
0
def main():
    whill = ComWHILL(port='COM4')
    while True:
        time.sleep(3)
        whill.send_power_off()
        time.sleep(3)
        whill.send_power_on()
Exemplo n.º 2
0
def main():
    whill = ComWHILL(port='/dev/ttyUSB0')
    whill.register_callback('power_on', power_on_callback)
    while True:
        whill.sleep(3)
        whill.send_power_off()

        whill.sleep(3)
        whill.send_power_on()