Or Continue to Thread: Controlling all the EVO's LEDs…
Find Your Device:
22nd October 2010, 04:53 PM   |  #1  
OP Senior Member
Thanks Meter: 15
 
244 posts
Join Date:Joined: Jun 2010
So, I found this thread http://forum.xda-developers.com/show...ight=wimax+led that discusses how to control the EVO's Wimax LED, and I've found another thread that explained how to use Tasker to trigger the Capacitive buttons (http://forum.xda-developers.com/show...7&postcount=12).

Using this information, I was able to set:
Missed text: Blinking turquoise
Missed Call: Solid Red
Missed Calendar Event: Solid Yellow

Which got me to thinking what else can I control this way? Here is the list of values I found for controlling all the EVO's LEDs (thanks to the posters of the above threads for the starting info):

First here are all the values that I was able to confirm.

Wimax LED
Current "brightness" modes it supports:
0 = OFF
1 = Two quick turquoise flashes
2 = One quick turquoise flash
3 = One slow turquoise flash
4 = One slow turquoise flash then one slow red flash
5 = One slow yellow flash
129 = Solid red on
130 = Solid turquoise on
131 = Solid yellow on
Location: /sys/class/leds/wimax/brightness


Amber LED
Current "brightness" modes it supports:
0 = OFF
1 = ON
Location: /sys/class/leds/amber/brightness
Current "Blink" modes it supports:
0 = Solid
1 = Fast Blink
Location: /sys/class/leds/amber/blink

Green LED
Current "brightness" modes it supports:
0 = OFF
1 = ON
Location: /sys/class/leds/green/brightness
Current "Blink" modes it supports:
0 = Solid
1 = Fast Blink
Location: /sys/class/leds/green/blink

(note you can have amber on with blinking green and vice-versa).

Flashlight
Current "brightness" modes it supports:
0 = OFF
1 = Top LED
2 = Bottom LED
3 = Both LEDs
125 = Low Power
126 = Mid Power 1
127 = Mid Power 2 (same as 3)
128 = High Power
129 = High Power Single Flash
Location: /sys/class/leds/flashlight/brightness

Screen
Current "brightness" modes it supports:
0 - 255 brightness levels
Location: /sys/class/leds/lcd-backlight/brightness

Capacitive Buttons
0 = OFF
1 = ON
Location: /sys/class/leds/button-backlight/brightness

If you have "Tasker" installed and have root access, install "Locale Execute Plugin" from the Market.

In Tasker, create your event, and select "Plugin" as the Task, then choose the "Execute" plugin.

Enter the following command in the textbox (substituting the value and device you want to trigger)

@! echo 255 > sys/devices/platform/leds-gpio/leds/button-backlight/brightness

Important: You must "Test" the task once or twice and wait for the Superuser permissions to trigger, otherwise the task will not execute. You will need to do this for each task you create using this plugin.


One thing to note, using the commands above trigger a single event. If the system triggers an event that uses the LED you are using (e.g. charging the device) it will override your setting. However, you can also override the system trigger (trigger after charger is plugged in).

Setting this up correctly in Tasker, will allow you to do cool things like automatically turning off all LEDs when you start a Video, set your own alerts or trigger the flash if someone picks up your phone (to scare them), etc.

Feel free to add your own suggestions, or add anything I missed.