Created
October 17, 2019 20:39
-
-
Save parrotmac/7e1c584ffbb65bbfa84225a17e15a86d to your computer and use it in GitHub Desktop.
Quick script to control LEDs on Balena Fin 1.1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
red_on() { | |
echo 255 > /sys/class/leds/pca963x:red/brightness | |
} | |
red_off() { | |
echo 0 > /sys/class/leds/pca963x:red/brightness | |
} | |
blue_on() { | |
echo 255 > /sys/class/leds/pca963x:blue/brightness | |
} | |
blue_off() { | |
echo 0 > /sys/class/leds/pca963x:blue/brightness | |
} | |
green_on() { | |
echo 255 > /sys/class/leds/pca963x:green/brightness | |
} | |
green_off() { | |
echo 0 > /sys/class/leds/pca963x:green/brightness | |
} | |
all_on() { | |
red_on | |
green_on | |
blue_off | |
} | |
all_off() { | |
red_off | |
green_off | |
blue_off | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment