Saturday, January 30, 2010

This is my bright power led review

My latest adventure with the Nokia N900 has been learning how to control the Status LED on the front of the Nokia N900. The best discussion of this can be found in the thread (N900) Possible to change the colour of the notification light???.


Codemonkey listed the current set of patterns and said that adding new patterns to the list should be easy, but that getting other applications to use the new patterns might be difficult. So, I figured I would go out and add a few new patterns and see if I could get them to work.


The patterns are in the /etc/mce/mce.ini file. This is a text file you can edit with any text editor. It is suggested that you make a backup copy of the mce.ini file, which is a good idea. However, I don’t believe you can really do a lot of damage editing this file.


Editing existing patterns is relatively simple. The one thing that you need to know is that the N900 appears to use the patterns in the section, so make sure you are editing the right pattern in the right section. I did find it challenging to use multiple engines, which is what appears to be necessary to make the led flash different colors. I may come back to that again later.


Adding a new pattern requires one additional step. There is a section called which have a list of patterns. Any new pattern should be added to this semi-colon delimited list. For my purposes, the first thing I did was add the PatternExample pattern to this list so I could use it in testing. Later, I added PatternFoo for additional testing. For my purposes, I may add seven new patterns, PatternR, PatternG, PatternB, PatternRG, PatternRB, PatternBG and PatternRGB. Each of these would leave the LED on for the specified color.


The next step was to reload the patterns. I used the command



initctl stop mce; sleep 2; initctl start mce


Finally, I could test my patterns. Lifting from the script that CodeMonkey provided, I used the commands



dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_led_pattern_activate string:PatternExample


and


dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_led_pattern_deactivate string:PatternExample


to turn on and off the LED patterns. Throwing this into a shell script with appropriately placed ‘sleep’ commands, I could make an interesting set of LED display sequences.


With that, I am now thinking about different things I could do with this. For example, I probably set up dbus-scripts to make the lights do different things when various events happen on the phone. I could use this to add lights to various other scripts that I use, such as the hdr script I’ve been playing with. I could also see this as a nice addon to various games, for example a racing game where the LED goes from red to amber to green to indicate the start of the race.


So, are you doing anything interesting with the Status LED on your Nokia N900?



So in a previous post I talked about ordering LED Replacement Lightbulbs for my dome lights.



I found it interesting to learn that these are called Festoon Bulbs. I don't know why I do, but I like that word.



Today, I took the 5 minutes needed and installed them. Here's what they looked like with the LED Bulb put in:





Here's what it looked like Hanging Loose:





BEFORE:





AFTER:





So, these are significantly brighter. The light is White light though not the soft yellow of a incandescent bulb. These use less energy (1 Watt as opposed to 10 Watts) and won't ever burn out or suffer from vibration.



Not sure if I like the White Light though. I have to think about that one.



That's about it.



Casey
bi color led

No comments:

Post a Comment