Created
September 9, 2023 12:10
-
-
Save agmm/1c7fa347a8850b9791159307e3c469cc to your computer and use it in GitHub Desktop.
Script to control the onboard LEDs of the Raspberry Pi
This file contains hidden or 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
#!/bin/bash | |
# Usage: leds <state>, where state can be 0 or 1 | |
sudo sh -c "echo $1 > /sys/class/leds/PWR/brightness" | |
sudo sh -c "echo $1 > /sys/class/leds/ACT/brightness" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment