|
|
@ -23,21 +23,20 @@ if len(sys.argv)!=2: |
|
|
|
sys.exit(2) |
|
|
|
|
|
|
|
if sys.argv[1] == "on": |
|
|
|
print("LED on") |
|
|
|
print("LED on \n") |
|
|
|
removeTrigger() |
|
|
|
writeLED("/brightness", "1") |
|
|
|
print("LED3 on") |
|
|
|
print("LED3 on \n") |
|
|
|
elif sys.argv[1] == "off": |
|
|
|
print("LED off") |
|
|
|
print("LED off \n") |
|
|
|
removeTrigger() |
|
|
|
writeLED("/brightness", "0") |
|
|
|
print("LED3 off") |
|
|
|
print("LED3 off \n") |
|
|
|
elif sys.argv[1] == "blink": |
|
|
|
print("LED blinking") |
|
|
|
while True: |
|
|
|
writeLED("/trigger", "timer") |
|
|
|
writeLED("/delay_on", "50") |
|
|
|
writeLED("/delay_off", "50") |
|
|
|
print("LED blinking \n") |
|
|
|
writeLED("/trigger", "timer") |
|
|
|
writeLED("/delay_on", "500") |
|
|
|
writeLED("/delay_off", "500") |
|
|
|
else: |
|
|
|
print("Wrong command!!!") |
|
|
|
|
|
|
|