Browse Source

Minor changes

master
Gustavo Martinez 2 years ago
parent
commit
be36ea5415
1 changed files with 8 additions and 9 deletions
  1. +8
    -9
      led.py

+ 8
- 9
led.py View File

@ -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!!!")


Loading…
Cancel
Save