Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    LED Blinking

    Reply
    Page 3 of 3 | Prev |   1     2   3 |
    TrueJournals | # 21 | 2009-06-14, 18:23 | Report

    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.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to TrueJournals For This Useful Post:
    LABAUDIO

     
    LABAUDIO | # 22 | 2009-06-14, 18:41 | Report

    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

    Edit | Forward | Quote | Quick Reply | Thanks

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

     
    TrueJournals | # 23 | 2009-06-14, 23:26 | Report

    The different sections of the line are separated by semicolons. So, priority is the first part, then a semicolon, then the "ScreenOn" value, then a semicolon, etc. So, I'll use your example and point out each section of the programming.

    0;1;0;40002000200040ff200020000000;0000;0000

    To make this easier, I'm going to assign an index to each section of the command. I'll split the string up by the semicolons. We'll say the first character (a zero, in this case) has an index of 1. The second part of the split (a one), has an index of 2, etc, etc.

    0;1;0;40002000200040ff200020000000;0000;0000
    Index 1 defines the priority. If two patterns trigger at once, items with a higher priority (lower number for this section), take precedence, because only one pattern can be going at once. Since the priority is 1 (0 being the highest priority, 255 being the lowest), this pattern will display instead of almost any other pattern (the exception is patterns that have a priority of 0)

    0;1;0;40002000200040ff200020000000;0000;0000
    Index 2 defines whether or not the pattern should fire based on what state the display is in. In this case, it's a 1, which mce.ini tells us means "show pattern even when the display is on". So, this pattern will display no matter what.

    0;1;0;40002000200040ff200020000000;0000;0000
    Index three gives the timeout. This can tell the pattern to stop firing after a certain amount of time. In this case, it's a zero, which means that the pattern will never stop firing (unless it's told to).

    0;1;0;40002000200040ff200020000000;0000;0000
    Index four starts the actual programming of the LED. Index four gives the programming of the RED LED. It also gets a bit more complicated here. We have to split this section up into strings of four characters each in order to understand the programming. This is what the pattern looks like, split into four-character strings, with each string separated by a pipe (|):
    4000|2000|2000|40ff|2000|2000|0000
    So, there are seven different commands given to the red LED. Let's take a look at them one by one:
    1. 4000 -- This sets the brightness of the LED (anything starting with a 40 will change the brightness). I believe this tells the LED to turn off (0 brightness). I believe that ff would be 100% brightness.
    2. 2000 -- This bumps the brightness up over a certain amount of time. This gets REALLY confusing. The first two characters, 20, tell how long it should take to change the brightness. 20 is in the 01 - 3f range, so we get "short" steps. If I understand this, we get 19 "short" steps of time ~0.49ms, so this should take about 9.31 milliseconds. The next two characters, 00, defines how many steps in brightness the LED should take. 00 is no change, so the pattern will pause for about 9.31 milliseconds.
    3. 2000 -- Because this is the same command as above, this will also create a 9.31 millisecond pause.
    4. 40ff -- Again we see a 40. This says to change the channel brightness. This time, we're changing it to ff, which should be 100% brightness. So, this command turns the LED on.
    5. 2000 -- This creates another 9.31 ms pause.
    6. 2000 -- This creates another 9.31 ms pause.
    7. 0000 -- This tells the pattern to loop ("jump to the start of the pattern").
    So, the red LED will turn off, pause for (2*9.31 ms =) 18.62 milliseconds, turn on, pause for another 18.62 milliseconds, then loop.

    0;1;0;40002000200040ff200020000000;0000;0000
    Index five gives the pattern for the GREEN LED. This is a very exciting pattern. It simply tells the pattern to repeat again and again and again. So... nothing happens with the green LED.

    0;1;0;40002000200040ff200020000000;0000;0000
    Index six gives the pattern for the BLUE LED. Again, very exciting. The blue LED does... nothing.

    I hope this helps you understand how the programming works.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 3 Users Say Thank You to TrueJournals For This Useful Post:
    LABAUDIO, qwerty12, sjgadsby

     
    LABAUDIO | # 24 | 2009-06-15, 01:18 | Report

    wow True i know now why i naturaly ported for you for my issue :

    This responce is completely perfect and all clear...

    you are a perfect example of a friendly and gratfull helper.

    what can i say exept a big big TX and of course i give you a first try for my future application of LED

    TX a lot

    that cant be more clear and i like it in this way...

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to LABAUDIO For This Useful Post:
    TrueJournals

     
    LABAUDIO | # 25 | 2010-05-20, 03:39 | Report

    Originally Posted by ciroip View Post
    Im 'working' on the Synesthesia mp3 player and I put there a fade trough the colors in relation to the song/podcast timing so will be possible to understand approximately the point is playing just watching the led (I just didnt link to the leds but the color generation is there.
    I already made some experiment to show the lyrics for a sort of karaoke (generation of the xml and sync to the mp3) and I was thinking to use the leds for timing.
    I have to browse zeinternet to see how I can access to the raw mp3 stream and try to sync some led effects to the beat/bass/whatever and then let the user choose between the 3 modes.

    @LABAUDIO
    the problem is I have no idea how integrate the os functions with the mce.ini led preset. I just set the leds colors in relation of the function I made in my applications (or could be possible, if you are brave enough, try to add the leds event in any existent applications
    )
    Finaly after many reflexions lol...i think the best is to make an hybrid ui-application between mce.edit code and other side application for add and manage extra pattern clocked whit command

    Reference

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Page 3 of 3 | Prev |   1     2   3 |
vBulletin® Version 3.8.8
Normal Logout