Forum
  • Search
  • Member List
  • Calendar
Hello There, Guest! Login Register — Login with Facebook

[SOLVED] Where is the ACT led file?
Thank you for your donation

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
Solved: Where is the ACT led file?
29th Nov, 2014, 08:35 AM
Post: #1
kusti8 Offline
Registered
Posts: 4
Joined: Nov 2014
Reputation: 0
Where is the ACT led file?
I wanted for the ACT led to flash when a button was pressed. While I was following a tutorial, it said to change files in /sys/class/leds/led0. The files are brightness which holds a 1 or a 0 and trigger and others also. Where would that file be in xbian?
Find all posts by this user
Quote this message in a reply
29th Nov, 2014, 09:14 AM
Post: #2
CurlyMo Offline
Registered
Posts: 3,501
Joined: Dec 2012
Reputation: 202
RE: Where is the ACT led file?
If you are looking for missing functionality (especially in sysfs), look for modules first. I honestly didn't know about this functionality so i did as well:
Code:
root@pi ~ # find /lib -name led*
/lib/modules/3.15.8+/kernel/drivers/leds
/lib/modules/3.15.8+/kernel/drivers/leds/trigger/ledtrig-camera.ko
/lib/modules/3.15.8+/kernel/drivers/leds/trigger/ledtrig-transient.ko
/lib/modules/3.15.8+/kernel/drivers/leds/led-class.ko
/lib/modules/3.15.8+/kernel/drivers/leds/leds-gpio.ko

Code:
root@pi ~ # modprobe leds-gpio

And tadaa:
Code:
root@pi ~ # ls /sys/class/leds/led0/
brightness  device  max_brightness  subsystem  trigger  uevent

pilight - modular domotica solution
Visit this user's website Find all posts by this user
Quote this message in a reply
30th Nov, 2014, 01:20 AM
Post: #3
kusti8 Offline
Registered
Posts: 4
Joined: Nov 2014
Reputation: 0
RE: Where is the ACT led file?
(29th Nov, 2014 09:14 AM)CurlyMo Wrote:  If you are looking for missing functionality (especially in sysfs), look for modules first. I honestly didn't know about this functionality so i did as well:
Code:
root@pi ~ # find /lib -name led*
/lib/modules/3.15.8+/kernel/drivers/leds
/lib/modules/3.15.8+/kernel/drivers/leds/trigger/ledtrig-camera.ko
/lib/modules/3.15.8+/kernel/drivers/leds/trigger/ledtrig-transient.ko
/lib/modules/3.15.8+/kernel/drivers/leds/led-class.ko
/lib/modules/3.15.8+/kernel/drivers/leds/leds-gpio.ko

Code:
root@pi ~ # modprobe leds-gpio

And tadaa:
Code:
root@pi ~ # ls /sys/class/leds/led0/
brightness  device  max_brightness  subsystem  trigger  uevent

Thanks, you learn something new every day! One comment, to anybody else doing this: I had to run modprobe from /sbin
Find all posts by this user
Quote this message in a reply
30th Nov, 2014, 02:16 AM (This post was last modified: 30th Nov, 2014 02:16 AM by rikardo1979.)
Post: #4
rikardo1979 Offline
Management
******
Posts: 3,545
Joined: Dec 2012
Reputation: 190
RE: Where is the ACT led file?
(30th Nov, 2014 01:20 AM)kusti8 Wrote:  
(29th Nov, 2014 09:14 AM)CurlyMo Wrote:  If you are looking for missing functionality (especially in sysfs), look for modules first. I honestly didn't know about this functionality so i did as well:
Code:
root@pi ~ # find /lib -name led*
/lib/modules/3.15.8+/kernel/drivers/leds
/lib/modules/3.15.8+/kernel/drivers/leds/trigger/ledtrig-camera.ko
/lib/modules/3.15.8+/kernel/drivers/leds/trigger/ledtrig-transient.ko
/lib/modules/3.15.8+/kernel/drivers/leds/led-class.ko
/lib/modules/3.15.8+/kernel/drivers/leds/leds-gpio.ko

Code:
root@pi ~ # modprobe leds-gpio

And tadaa:
Code:
root@pi ~ # ls /sys/class/leds/led0/
brightness  device  max_brightness  subsystem  trigger  uevent

Thanks, you learn something new every day! One comment, to anybody else doing this: I had to run modprobe from /sbin
nice one, so all sorted now? if yes, can you please edit prefix of the thread to [Solved]? thanks

~~~~>>>Please always follow rules and read before you post<<<~~~~
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:

Current time: 9th May, 2025, 06:05 PM Powered By MyBB, © 2002-2025 MyBB Group.