Using the user leds 点亮用户灯
beaglebone吧
全部回复
仅看楼主
level 6
btiger 楼主
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
2013年02月27日 07点02分 1
level 6
btiger 楼主
这么好的帖子怎么没人支持呢?看来还是改日我自己改写一套中文教程吧。
看看大家有什么反应。
2013年03月04日 01点03分 2
level 1
这个 很简单的啦
2013年03月08日 01点03分 3
level 6
btiger 楼主
欢迎大家来讨论 BeagleBone的学习资料,这里人气好少啊。[抖胸]
2013年03月12日 03点03分 4
1