All times are UTC-06:00




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
 Post subject: make LEDs blink
PostPosted: Tue Apr 09, 2013 3:24 am 
Offline

Joined: Thu Dec 15, 2011 10:25 am
Posts: 6
Hello everyone.

I am a proud smartbook owner. Sometimes (especially at work), I keep my smartbook on my desk, on but with the lid closed. I was thinking that it would be awesome if the smartbook could warn me of new mail with, say, a flashing led.

I wrote a simple bash script to check for mail (writing 'new messages' in a file when the mailbox is not empty), but I don't know wheter it is possible to make one of the LEDs blink on such event.

I started by typing
Code:
find /sys/ -name 'led*'
but quickly got lost. Can some dev tell me what's the file to check/modify for making a LED blink?
Thanks!

edit: I am talking about the 'external' LEDS (i.e. the power-on one and the other one on the left hand side with a small picture of a mail on it)


Top
   
 Post subject: Re: make LEDs blink
PostPosted: Tue Apr 09, 2013 6:47 am 
Offline

Joined: Thu Dec 15, 2011 10:25 am
Posts: 6
Code:
root@efikamx:/sys/bus/platform/drivers/leds-gpio/leds-gpio/leds/led:alarm# echo "255" > brightness
^-- that seems to do the trick. But any other info is appreciated :)


Top
   
 Post subject: Re: make LEDs blink
PostPosted: Fri Apr 12, 2013 10:51 am 
Offline
Site Admin

Joined: Fri Sep 24, 2004 1:39 am
Posts: 1589
Location: Austin, TX
Quote:
Code:
root@efikamx:/sys/bus/platform/drivers/leds-gpio/leds-gpio/leds/led:alarm# echo "255" > brightness
^-- that seems to do the trick. But any other info is appreciated :)
That is exactly how to do it. led:alarm and led:capslock are the only LEDs in the system - you CAN hijack the capslock LED to do whatever you like (hint - it's the trigger property). Either you give it default-on (which turns it into an on-off switch) or some built-in trigger (mmc0 or ide-disk or something) and it will turn into that. Of course, then you can't tell if capslock is on or not :)

_________________
Matt Sealey


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 3 posts ] 

All times are UTC-06:00


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
PowerDeveloper.org: Copyright © 2004-2012, Genesi USA, Inc. The Power Architecture and Power.org wordmarks and the Power and Power.org logos and related marks are trademarks and service marks licensed by Power.org.
All other names and trademarks used are property of their respective owners. Privacy Policy
Powered by phpBB® Forum Software © phpBB Group