ACT Blink double
This commit is contained in:
parent
8f2f5711ea
commit
8bb57c476b
4
app.py
4
app.py
|
@ -68,15 +68,19 @@ def getRSSI():
|
|||
def blinkPy():
|
||||
# disable mmc access led
|
||||
os.system('echo none | sudo tee /sys/class/leds/led0/trigger')
|
||||
os.system('echo none | sudo tee /sys/class/leds/led1/trigger')
|
||||
# Blink 10 times
|
||||
for j in range(10):
|
||||
# TODO : add dd to NOPASSWD in /etc/sudoers.d/010...
|
||||
os.system('echo 1 | sudo tee /sys/class/leds/led0/brightness') # led on
|
||||
os.system('echo 0 | sudo tee /sys/class/leds/led1/brightness') # led on
|
||||
time.sleep(.2)
|
||||
os.system('echo 0 | sudo tee /sys/class/leds/led0/brightness') # led off
|
||||
os.system('echo 1 | sudo tee /sys/class/leds/led1/brightness') # led off
|
||||
time.sleep(.2)
|
||||
# restore default behavior
|
||||
os.system('echo mmc0 | sudo tee /sys/class/leds/led0/trigger')
|
||||
os.system('echo default-on | sudo tee /sys/class/leds/led1/trigger')
|
||||
return "OK"
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue