Thread: LED Blinking
View Single Post
LABAUDIO's Avatar
Posts: 315 | Thanked: 71 times | Joined on Oct 2008 @ €@$T Montreal Quebec Canada
#22
Originally Posted by TrueJournals View Post
NJoy is the name of the LED controller in the n810. In the NJoy, all three colors are controlled independently, so the last three parameters give the programming for each LED color (with red, green, and blue, it should be possible to make any color).

Here's the tricky part: getting it all to work together. Remember that the colors are controlled INDEPENDENTLY. They all work individually with their separate programming, and don't really interact with each other. Having said that, the programming given to them is just a string of numbers. Each command consists of four digits. From mce.ini, here's a short guide:

Code:
# 0000 -- Jump to the start of the pattern for the channel
# 40xx -- Set channel brightness
# xxyy -- Increment/decrement
#      xx determines the speed;
#         01-3f -- short step time (granularity 0.49ms)
#         41-7f -- long step time (granularity 15.6ms)
#      yy determines the increment/decrement steps
#         00-7f -- increment steps 00 = 0 steps, 7f = 127 steps
#         80-ff -- decrement steps 80 = 0 steps, ff = 127 steps
#
#         Use 0 steps to create pauses
#         Two consecutive increment/decrement sequences are needed
#         to cover the entire range from 0-255
# c000 -- End pattern execution
# e002 -- Send red trigger
# e004 -- Send green trigger
# e008 -- Send blue trigger
# e080 -- Wait for red trigger
# e100 -- Wait for green trigger
# e200 -- Wait for blue trigger
I'm not quite sure how the "wait for x trigger" and "send x trigger" works. I'm assuming you can have, for example, the "wait for blue trigger" command in blue, and blue will pause execution until another color gives the "send blue trigger" command, but I can't test this, because I don't have a n810.
so in my example :

Code:
PatternError=0;1;0;40002000200040ff200020000000;0000;0000
in this line :

#Priority (0 - highest, 255 - lowest)
# ScreenOn - 0 only show pattern when the display is off
# 1 show pattern even when the display is on
# 2 only show pattern when the display is off, including acting dead
# 3 show pattern even when the display is on, including acting dead
# 4 only show pattern if the display is off, or if in acting dead
#Timeout in seconds before pattern is disabled, 0 for infinite
# OnPeriod time in milliseconds
# OffPeriod time in milliseconds
# (0 for continuous light; ONLY when the charger is connected!)
# Intensity in steps from 0 (off) to 15 (full intensity)
------------------------------------------------------------------------

after that i miss something...
-----------------------------

-----------------------------
0=Priority (0 - highest)
1=show pattern even when the display is on


0=for infinite
4000=
This sets (40) the brightness of this color to 00, turning the color effectively off

2000=
This waits a short amount of time (20 could increase/decrease the speed of the animation, but the parameter 00 doesn't change anything: This is a sleep())

2000=
See above

40ff=
This sets (40) the brightness of this color to FF, turning the red part to max. brightness

2000
See 2000 above.

2000
Same

0000
This loops back to the start of the pattern (thereby reaching 4000, turning the LED off again etc..)

------------------


ff is red color? what is code for blue or green?

here i dont understand clearly this :
# 40xx -- Set channel brightness
# xxyy -- Increment/decrement
# xx determines the speed;
# 01-3f -- short step time (granularity 0.49ms)
# 41-7f -- long step time (granularity 15.6ms)
# yy determines the increment/decrement steps
# 00-7f -- increment steps 00 = 0 steps, 7f = 127 steps
# 80-ff -- decrement steps 80 = 0 steps, ff = 127 steps
#

i know its this part for each color but i can make a link for understand all whith my example up here...

i hope i got it soon (iam a french noob) damn! lol
__________________
N900 Owner N95 + N810
Fremantle Tester
Diablo Dacker
French Noob

BorgTheme ¤ BorgSounds ¤ BorgStartUp ¤ BorgClock

Last edited by LABAUDIO; 2009-06-14 at 18:45.