Skip to content

Commit

Permalink
Update led_sys.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelscholle committed Apr 12, 2024
1 parent 6aab76b commit b63dc20
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions led_sys.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ elif grep -q "Raspberry Pi" /proc/cpuinfo; then
COLOR="green"
debugMessage "Only One LED"
fi
elif [ ! -d /sys/class/leds/user-led/brightness ]; then
PLATFORM="cm3"
debugMessage "Only One LED"
fi

# Main functions
Expand Down Expand Up @@ -95,6 +98,8 @@ LED_ON() {
echo 1 > /sys/class/leds/ACT/brightness
echo 1 > /sys/class/leds/PWR/brightness
fi
elif [ "$PLATFORM" == "cm3" ]; then
echo 1 > /sys/class/leds/user-led/brightness
fi
}

Expand Down Expand Up @@ -144,6 +149,8 @@ LED_OFF() {
echo 0 > /sys/class/leds/ACT/brightness
echo 0 > /sys/class/leds/PWR/brightness
fi
elif [ "$PLATFORM" == "cm3" ]; then
echo 0 > /sys/class/leds/user-led/brightness
fi
}

Expand Down

0 comments on commit b63dc20

Please sign in to comment.