LED and User button accessing using programmicatically

Hi All,

I recently bought Beagle board rev C. Everything is working fine. I want to access LEDs and User button of the board using program. That means now my board running with Angstrom Linux, Is it possible to control LEDs and User button using program. Please give your suggestions…

You can see an example of blinking with LEDs here: http://www.gigamegablog.com/2012/01/05/beaglebone-coding-101-blinking-an-led/

BR, Thomas Fogh

That doesn’t answer the user/reset button is that reconfigurable?
I too am curious about this.


Here’s a script for accessing the LED, hope u find it interesting:

echo none > ${SYSFS_DIR}/beagleboard::usr0/trigger
while [ $LOOPCTR -lt 0 ]
echo 1 > ${SYSFS_DIR}/beagleboard::usr0/brightness
sleep 2
echo 0 > ${SYSFS_DIR}/beagleboard::usr0/brightness
sleep 2
exit 0

u can execute this script by ./led_script.sh


Depending on the kernel you are using, you can use the gpio or
gpio-keys driver for accessing the USER button. If the gpio-keys
driver is loaded, the gpio driver cannot be used because it is
allocated to the gpio-keys driver.

For using the gpio driver, see http://www.kernel.org/doc/Documentation/gpio.txt

Typically, the USER button should be allocated to the gpio-keys
driver. You can look at the source for 'evtest' to look at how to
check the status of the button. Here's what comes up near the top
when I google this: