def demo(): s = interface.connect() while True: interface.turn_on(s) time.sleep(5) interface.turn_off(s) time.sleep(5) return "Demo!"
def turnOff(): # put in pyserial here s = interface.connect() interface.turn_off(s) return "Turning off"