Reply
Thread Tools
Posts: 67 | Thanked: 126 times | Joined on Jun 2010 @ Germany
#1
Hi everyone,

I was wondering if it is possible to have a custom LED pattern to indicate I/O activity like the HDD LED on a computer. Also some network activity LED pattern?

I don't know if the patterns are limited to specific types, and all I found was a thread of someone asking a question about a custom LED pattern for each contact, which was not answered...

Thanks for your help!

Daniel
__________________
  • If you have issues with the Maemo port of VCMI (Heroes 3), please report here.
  • If you have crashes, make sure to get an error log by running vcmi through xterm. (Type "vcmiclient" in the X Terminal application)
  • Some installation instructions can be found here.
  • For questions regarding VCMI features, a timeline, new releases and the like, please visit the VCMI board and their Wiki.
 

The Following User Says Thank You to 0x47 For This Useful Post:
Posts: 2,225 | Thanked: 3,822 times | Joined on Jun 2010 @ Florida
#2
If you have Advanced Clock Plugin installed, I've made a clock style that I'm going to be releasing soon that shows bars for network activity over different interfaces. [/shameless plug]

As for led pattern editing... it should be doable, but I'm not sure how much of the actual software controlling the LED light is closed source.
 
Posts: 67 | Thanked: 126 times | Joined on Jun 2010 @ Germany
#3
Thanks for the hint, I don't have such a plugin though.

Any idea how this could be done? (I admit, my question was only if it is possible, but I actually want to know how ) Using "LED patterns" I seem to be only able to customize given patterns, instead of creating custom patterns...
__________________
  • If you have issues with the Maemo port of VCMI (Heroes 3), please report here.
  • If you have crashes, make sure to get an error log by running vcmi through xterm. (Type "vcmiclient" in the X Terminal application)
  • Some installation instructions can be found here.
  • For questions regarding VCMI features, a timeline, new releases and the like, please visit the VCMI board and their Wiki.
 
Posts: 701 | Thanked: 585 times | Joined on Sep 2010 @ London, England
#4
Originally Posted by 0x47 View Post
Thanks for the hint, I don't have such a plugin though.

Any idea how this could be done? (I admit, my question was only if it is possible, but I actually want to know how ) Using "LED patterns" I seem to be only able to customize given patterns, instead of creating custom patterns...
The "LED Patterns" utility just changes the preset patterns in /etc/mce/mce.ini. I don't think it would be possible to do I/O activity while mce still controls the LED because you can't change the patterns dynamically. Maybe it is possible to set one of the patterns to a solid colour which could be turned off/on based on I/O, if it could be done quickly enough it might be a workable solution. Otherwise you'd need to stop mce controlling the LED and write some software to control it more directly.
 

The Following 2 Users Say Thank You to retsaw For This Useful Post:
dr_frost_dk's Avatar
Posts: 1,503 | Thanked: 2,688 times | Joined on Oct 2010 @ Denmark
#5
in etc/mce/mce.ini under 'modules=' there is a variable that is named 'led' you can remove this to disable normal led function, just like i did with the 'filter-brightness-als' in my custom brightness
 

The Following 2 Users Say Thank You to dr_frost_dk For This Useful Post:
Posts: 67 | Thanked: 126 times | Joined on Jun 2010 @ Germany
#6
Thank you guys! Now just tell me how to control the LEDs directly and I should be fine...
__________________
  • If you have issues with the Maemo port of VCMI (Heroes 3), please report here.
  • If you have crashes, make sure to get an error log by running vcmi through xterm. (Type "vcmiclient" in the X Terminal application)
  • Some installation instructions can be found here.
  • For questions regarding VCMI features, a timeline, new releases and the like, please visit the VCMI board and their Wiki.
 
Posts: 306 | Thanked: 566 times | Joined on Jan 2010 @ Romania
#7
@G :
you can add how many patterns you want.
if you want hdd like led there is no way with led chip. this is designed to display a fixed pattern like a beacon when a specific event trigger it. random patterns are difficult to make and controll. the only way to have hdd-like behavior is by direct alter led current.
so yo must make a "white" pattern and activate it and after that you can drive the leds as you want by shell script*, pyton script or c program


* command is
echo X > /sys/class/leds/lp5523:r( or g, or b )/led_current where X is led current in 0.1 mA step so 255 value mean 25,5 mA .
the led brightness is this value weighted by pattern value .Example :
pattern PWM 128 and 10 mA ( echo 100 > .... ) mean 5 mA
 

The Following 2 Users Say Thank You to blue_led For This Useful Post:
Posts: 346 | Thanked: 271 times | Joined on Jan 2010
#8
Leds intensity are in "/sys/class/leds/lp5523:$C/brightness" where $C is b,g or r, echo it from 0 to 255 to change intensity.
I'm not sure if this is the better way to set leds but it works.

Edit:watching a youtube video while posting is a good idea to get pwned.
 

The Following 2 Users Say Thank You to Megaltariak For This Useful Post:
Posts: 67 | Thanked: 126 times | Joined on Jun 2010 @ Germany
#9
Thank you guys, works flawless!

After echoing a value, the LED lights up for X ms. Is X the smallest possible value (probably 49 ms if LED pattern uses the smallest possible value)? Or is there a way of altering the duration in this scenario?

EDIT: What is the exact difference between led_current and brightness? I did some testing, and got weird results: If I change the brightness of RED to 255 during the orange pulsing battery-charging pattern, the red LED turns on and stays on until the charging-pulse is over. Then everything is back to normal (orange pulse)...
If I set the led_current to 255 tho, the color of the pulsing pattern stays red forever (now pulsing as well)... How to explain that?

Last edited by 0x47; 2011-02-21 at 14:06.
 

The Following User Says Thank You to 0x47 For This Useful Post:
Posts: 306 | Thanked: 566 times | Joined on Jan 2010 @ Romania
#10
led driver have 2 hardware modules and 2 operations mode .
operations mode ->fixed brightness and programmed.
hardware modules -> constant current source ( programmed by led_current ) and pulse width modulator PWM values programmed by brightness or by running program
led_current is self explained : and set max current.
this is a primordial value. it act as "volume" on a music player
brightness and PWM ( & ramp settings in the pattern ) act as a "melody" .it is a percentage of current applied to led. 255 value mean 100 %

if you program brightness this value is overwritten by pl5523 running programs even on "black" pattern
if you want to test you need a "stopped" program. try to make/ modify using led pattern editor, a pattern with end ( hold ) instruction instead GoToStart.
after that you can play any "melody " at your WHITE programmed led.

i recommend you to not set currents above 5 mA ( 50 value ) . ussless drain of the battery & asic heat, but you can set pwm or brightness to 255 mean 100% of current ( 5mA example )

r=/sys/class/leds/lp5523:r/

echo 10 > $r/led_current ; echo 255 > $r/brightness

and

echo 255 > $r/led_current ; echo 10 > $r/brightness

are equivalent in led light perceptual intensity
first give a continuous dimmed red
second make pulsed light
 

The Following 2 Users Say Thank You to blue_led For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 14:20.