The BeagleBone has 4 user leds located on the main board close to the Ethernet port.They typically won't be visible if you put the BeagleBone in an enclosure, but they can be good for debugging and visually seeing the status.
The user leads are accessible from user land on the file system at this location:
/sys/devices/platform/leds-gpio/leds/There is one directly per user led, named:
/sys/devices/platform/leds-gpio/leds/beaglebone::usr0/
/sys/devices/platform/leds-gpio/leds/beaglebone::usr1/
/sys/devices/platform/leds-gpio/leds/beaglebone::usr2/
/sys/devices/platform/leds-gpio/leds/beaglebone::usr3/Inside each directory, there is a file names "brightness". If you write a "0" or a "1" to this file, then you can control the status of that led.
Here is a sample command to turn on user led 1:
echo 1 > /sys/devices/platform/leds-gpio/leds/beaglebone\:\:usr1/brightness
Note that user led 0 is already in use to indicate Ethernet activity, so you should use the user leds 1,2 and 3 for you projects.
For reference, this is the mapping to GPIO pins the user leds are mapped to:
USER LED GPIO PIN
User led 0 GPIO1_21
User led 1 GPIO1_22
User led 2 GPIO1_23
User led 3 GPIO1_24
http://beaglebone.cameon.net/home/using-the-user-leds
The user leads are accessible from user land on the file system at this location:
/sys/devices/platform/leds-gpio/leds/There is one directly per user led, named:
/sys/devices/platform/leds-gpio/leds/beaglebone::usr0/
/sys/devices/platform/leds-gpio/leds/beaglebone::usr1/
/sys/devices/platform/leds-gpio/leds/beaglebone::usr2/
/sys/devices/platform/leds-gpio/leds/beaglebone::usr3/Inside each directory, there is a file names "brightness". If you write a "0" or a "1" to this file, then you can control the status of that led.
Here is a sample command to turn on user led 1:
echo 1 > /sys/devices/platform/leds-gpio/leds/beaglebone\:\:usr1/brightness
Note that user led 0 is already in use to indicate Ethernet activity, so you should use the user leds 1,2 and 3 for you projects.
For reference, this is the mapping to GPIO pins the user leds are mapped to:
USER LED GPIO PIN
User led 0 GPIO1_21
User led 1 GPIO1_22
User led 2 GPIO1_23
User led 3 GPIO1_24
http://beaglebone.cameon.net/home/using-the-user-leds
