Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    LED Blinking

    Reply
    Page 2 of 3 | Prev |   1   2   3   | Next
    ciroip | # 11 | 2009-03-22, 15:55 | Report

    Originally Posted by TrueJournals View Post
    Also, just scanning mce.ini, there seems to be some pretty good documentation in the file itself.
    as I posted before Im not a developer at all, easy I can miss completely the prettiest and best way to reach a result + I am very scared to touch OS files of other people devices

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by ciroip; 2009-03-22 at 15:58.

     
    Thesandlord | # 12 | 2009-03-22, 17:08 | Report

    Ciroip, I felt the LED control was the coolest part of FlipClock, as no other app takes advantage of it.

    What I want to see is a rave app, that syncs the screen color with the LED, and throbs different colors to the beat of the music... hehehehehe....

    Edit | Forward | Quote | Quick Reply | Thanks

     
    LABAUDIO | # 13 | 2009-03-22, 20:14 | Report

    ok so here...is what i keep now for possibly make a little simple application for this data sheet...

    any others ideas be appreciate...

    this is default setting for now :

    -Device start-up
    -Device shutdown
    -Web camera On
    -Charging battery
    -Battery fully charged
    -New e-mail message received
    -New instant message received
    -Chat invitation
    -Missed call
    -Authorization request
    -Device On
    -Device softpoweroff


    -----------To added------------------------------------
    -Phone call
    -RSS Feed
    -Download finish
    -Disco Music (LED pattern for music bpm)
    -Device softpower on (in normal mode)

    Any others functions can be add too here...




    --------------------------------------------------------------------------
    In other idea here is a color i have for now...

    White (pale blue)
    Green
    Blue
    Yellow
    Red
    Purple
    Orangina
    Green lime
    Pink



    any others colors adds??

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

    third part is Times

    i suggest 4 rows for start...

    -on and times between loop
    -number of loop
    -color timeline
    -Attenuation


    any idea can be add it for future built here too

    efficiently...this app suppose to be changed config and os file throug a nice user interface
    for manage ALL LED possibility





    dream come true soon

    LED FTW

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by LABAUDIO; 2009-06-15 at 01:30.

     
    ciroip | # 14 | 2009-03-22, 23:06 | Report

    Originally Posted by Thesandlord View Post
    Ciroip, I felt the LED control was the coolest part of FlipClock, as no other app takes advantage of it.

    What I want to see is a rave app, that syncs the screen color with the LED, and throbs different colors to the beat of the music... hehehehehe....
    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
    )

    Edit | Forward | Quote | Quick Reply | Thanks

     
    TrueJournals | # 15 | 2009-03-23, 02:17 | Report

    Originally Posted by LABAUDIO View Post
    ok so here...is what i keep now for possibly make a little simple application for this data sheet...

    any others ideas be appreciate...

    this is default setting for now :

    -Device start-up
    -Device shutdown
    -Web camera On
    -Charging battery
    -Battery fully charged
    -New e-mail message received
    -New instant message received
    -Chat invitation
    -Missed call
    -Authorization request
    -Device On


    -----------To added------------------------------------
    -Phone call
    -RSS Feed
    -Download finish
    -Disco Music (LED pattern for music bpm)

    Any others functions can be add too here...
    While it's VERY feasible (and should be relatively easy) to modify patterns that already exist, it would be near impossible to add the requested patterns. Unless some dbus signal is sent for these events, there is no way of finding out when these events trigger. Generally, applications need to specifically tell the LED to fire, and should use mce.ini to store the patterns, so that users can edit them.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    LABAUDIO | # 16 | 2009-03-24, 05:58 | Report

    here some find for help maybe

    http://www.google.com/notebook/publi...TgIgoQ3tW9iP0i

    and this py application issue

    if someone can re ''MOOD IT''

    Code:
    #!/usr/bin/env python
    
    ### proof of concept for the N810 LED control (ld5521) by jott
    
    import pygtk
    import hildon
    pygtk.require('2.0')
    import gtk
    
    class LEDColor:
    
        def set_color_callback(self, widget, data=None, value=None):
    	self.set_color(self.sliders[0].get_level(), self.sliders[1].get_level(), self.sliders[2].get_level())
    
        def set_color(self,r,g,b):
    	self.set_mode("direct")
    	value = "%X:%X:%X" % (r,g,b)
            FILE = open("/sys/devices/platform/i2c_omap.2/i2c-0/0-0032/color","w")
    	FILE.write(value)
    	FILE.close()
    
        def set_mode(self,mode):
            FILE = open("/sys/devices/platform/i2c_omap.2/i2c-0/0-0032/mode","w")
    	FILE.write(mode)
    	FILE.close()
    
        def delete_event(self, widget, event, data=None):
            return False
    
        def destroy(self, widget, data=None):
    	self.set_mode("run")
            gtk.main_quit()
    
        def __init__(self):
    	self.set_color(0,0,0)
    
            window = gtk.Window(gtk.WINDOW_TOPLEVEL)
            window.connect("delete_event", self.delete_event)
            window.connect("destroy", self.destroy)
            window.set_border_width(10)
    
            content = gtk.VBox()
            self.sliders = []
            for i in range(0,3):
    	    slider = hildon.HVolumebar()
    	    adj = slider.get_adjustment()
    	    adj.set_all(0, 0, 255, 1, 10)
    	    content.pack_start(slider, True, True, 0)
    	    slider.set_property("has_mute",False)
    	    slider.show()
    	    self.sliders.append(slider)
    
            for i in range(0,3):
        	    self.sliders[i].connect("level_changed", self.set_color_callback, None)
    
            window.add(content)
            content.show()
            window.show()
    
        def main(self):
            gtk.main()
    
    if __name__ == "__main__":
        led = LEDColor()
        led.main()

    i know nothing about coding lol

    Edit | Forward | Quote | Quick Reply | Thanks

     
    LABAUDIO | # 17 | 2009-03-24, 20:19 | Report

    Originally Posted by LABAUDIO View Post

    Code:
    #!/usr/bin/env python
    
    ### proof of concept for the N810 LED control (ld5521) by jott
    
    import pygtk
    import hildon
    pygtk.require('2.0')
    import gtk
    
    class LEDColor:
    
        def set_color_callback(self, widget, data=None, value=None):
    	self.set_color(self.sliders[0].get_level(), self.sliders[1].get_level(), self.sliders[2].get_level())
    
        def set_color(self,r,g,b):
    	self.set_mode("direct")
    	value = "%X:%X:%X" % (r,g,b)
            FILE = open("/sys/devices/platform/i2c_omap.2/i2c-0/0-0032/color","w")
    	FILE.write(value)
    	FILE.close()
    
        def set_mode(self,mode):
            FILE = open("/sys/devices/platform/i2c_omap.2/i2c-0/0-0032/mode","w")
    	FILE.write(mode)
    	FILE.close()
    
        def delete_event(self, widget, event, data=None):
            return False
    
        def destroy(self, widget, data=None):
    	self.set_mode("run")
            gtk.main_quit()
    
        def __init__(self):
    	self.set_color(0,0,0)
    
            window = gtk.Window(gtk.WINDOW_TOPLEVEL)
            window.connect("delete_event", self.delete_event)
            window.connect("destroy", self.destroy)
            window.set_border_width(10)
    
            content = gtk.VBox()
            self.sliders = []
            for i in range(0,3):
    	    slider = hildon.HVolumebar()
    	    adj = slider.get_adjustment()
    	    adj.set_all(0, 0, 255, 1, 10)
    	    content.pack_start(slider, True, True, 0)
    	    slider.set_property("has_mute",False)
    	    slider.show()
    	    self.sliders.append(slider)
    
            for i in range(0,3):
        	    self.sliders[i].connect("level_changed", self.set_color_callback, None)
    
            window.add(content)
            content.show()
            window.show()
    
        def main(self):
            gtk.main()
    
    if __name__ == "__main__":
        led = LEDColor()
        led.main()

    i know nothing about coding lol
    i dont knoiw if this python code work great when is compile

    someone know if all this code upthere can be compiled at .py for be launched whit python launcher or this piece of code is not finish???

    Edit | Forward | Quote | Quick Reply | Thanks

     
    TrueJournals | # 18 | 2009-03-24, 20:25 | Report

    Python code doesn't actually need to be "compiled" Just shove that in a .py file and run it from the command line with:
    Code:
    python (filename)
    From the looks of it (I don't have a n810 to test out these things...), it SHOULD work fine. It'll just display a couple sliders. When you move the sliders, the color of the LED on the n810 will change color (three sliders: Red, Green, and Blue)

    Edit | Forward | Quote | Quick Reply | Thanks

     
    ciroip | # 19 | 2009-03-24, 22:26 | Report

    yep, thats the example I used to base my routines on: to use them inside an application is pretty straightforward: linking led sequences to OS is something a bit different and trying to substitute a 'native' feature with one alternative does not sound too well to me

    Edit | Forward | Quote | Quick Reply | Thanks

     
    LABAUDIO | # 20 | 2009-06-14, 15:08 | Report

    Ok so after a lot of read and consultation , iam still stock


    here a line in example :

    Code:
    PatternError=0;1;0;40002000200040ff200020000000;0000;0000

    PatternError flashes a red light on and off.

    so i try to understand the line code uphere

    but hey...where is a color code in this line...

    cause :
    -----------------------------------------------------------
    The parameters, in order:

    * Priority: More than one pattern can be active, only one "wins" though, according to this number
    * ScreenOn, specifies in which device state the pattern is used (see the mce.ini comments)
    * Timeout, the number of seconds the pattern will be active. 0 for infinite
    * NJoy script for red
    * NJoy script for green
    * NJoy script for blue

    The last three parameters need some clarifications, for this we'll look at the samples above:

    PatternError flashes a red light on and off. Therefor the green and blue part of the pattern are not used (set to 0000, which does nothing on its own). The red part is interesting here. It's parsed in 2 byte steps (4 letters):

    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..)
    -----------------------------------------------------------------------------

    so i understand all the way here exept a color code (njoy table somewhere)

    that my issue for now

    what is all color code?njoy?rgb?

    after this issue....iam suppose to be ok for make a nice led application

    i just need to understand njoy color and what/where in the example line uphere is the color code (red in the example)

    TX to share if you know anything about this

    Edit | Forward | Quote | Quick Reply | Thanks

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