Shop OBEX P1 Docs P2 Docs Learn Events
Nice looking controls for PINK module — Parallax Forums

Nice looking controls for PINK module

TumblerTumbler Posts: 323
edited 2011-02-05 21:30 in General Discussion
Hi,

I have created some controls for the PINK module.
Pack contains leds, ledbars, analoge gauge.
PINK users can use them to show some outputs: leds, ledbar, values....

screenshots:
(see image properties of each control)
led.php?lc=r&s=3&v=13mm red led on led.php?lc=r&s=3&v=03mm led off
led.php?lc=g&s=5&v=15mm green led on

ledbar_green_5.jpg
ledbar_red_3.jpg

Make your own analoge gauge. white, yellow, red or green. With or without caption,ect.
horizontalgauge.php?v=-40horizontalgauge.php?v=30&c=Outside&mc=y




Post Edited (Tumbler) : 10/27/2009 10:55:37 AM GMT
«1

Comments

  • ElectricAyeElectricAye Posts: 4,561
    edited 2009-10-26 03:53
    Hey,

    that's pretty cool looking! I wish I had a PINK so I could play with your fancy gauges and all.

    thanks for sharing,
    Mark
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2009-10-26 04:25
    I don't suppose you have any HTML code for these? PHP is not one of my stronger languages...okay, not at all. =)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Parallax Engineering
    50 72 6F 6A 65 63 74 20 53 69 74 65
    ·
  • TumblerTumbler Posts: 323
    edited 2009-10-26 05:09
    Chris,


    You don't have to know PHP for this. The only thing you need is a server who can handles PHP.


    Just upload the unzipped PINK-PACK folder to it.


    Now you can point to this folder to create a control.


    Ex: var00 of the PINK = the outside temperature


    var01 the inside temp.


    In html we create an image: <img src="yourhost/PINK/horizontalgauge.phpv=<Nb_var00>&c=Outside" /> shows a white meter with outside temp


    <img src="yourhost/PINK/horizontalgauge.php?mc=y&v=<Nb_var01>&c=Inside" />


    shows:


    horizontalgauge.php?v=30&c=Outside
    horizontalgauge.php?v=35&c=Inside&mc=y


    Now play with the PINK vars: and refresh the page...
    (PHP is only used for the GD functions...)


    Post Edited (Tumbler) : 10/27/2009 10:56:22 AM GMT
  • TumblerTumbler Posts: 323
    edited 2009-10-26 10:25
    And the Display control looks like this:

    [img]http://www.tumbler.be/PINKPACK2/PINK/display.php?line1= PARALLAX 2x16&line2=GD2-display 1.0&light=off[/img]
    <img src="www.tumbler.be/display.php?line1= PARALLAX 2x16&line2=GD2-display 1.0&light=off" />

    and Backlight on :

    [img]http://www.tumbler.be/PINKPACK2/PINK/display.php?line1=Chris Savage&line2=CIRCUITS&light=on[/img]
    <img src="http://www.tumbler.be/display.php?line1=Chris Savage&line2=CIRCUITS&light=off" />

    Or oops, too long text inputs...

    [img]http://www.tumbler.be/PINKPACK2/PINK/display.php?line1= PARALLAX 2x16&line2=this is too long for me&light=off[/img]
    <img src="http://www.tumbler.be/display.php?line1= PARALLAX 2x16&line2=this is too long for me&light=off" />



    Post Edited (Tumbler) : 10/27/2009 10:57:42 AM GMT
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-10-26 17:32
    This is pretty cool! I hadn't thought about doing it this way before. But, once you have a connection to a local or internet server that can do all this, the services performed by the PINK can be barebones minimal. Yet, to the client, it looks like you've got fullblown dynamic graphics capability built-in.

    Nicely conceived and beautifully executed!

    -Phil
  • TumblerTumbler Posts: 323
    edited 2009-10-26 17:54
    Thx Phil,

    GD rocks!
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-10-26 18:23
    Tumbler said...
    GD rocks!
    Indeed. I've used it with Perl for years, both standalone and CGI, but didn't realize it was built in to PHP. ImageMagick is nice, too, but with a much heftier footprint.

    -Phil
  • TumblerTumbler Posts: 323
    edited 2009-10-27 10:50

    Tumbler said...


    Hi,

    I have created some controls for the PINK module.

    Pack contains leds, ledbars, analoge gauge.
    PINK users can use them to show some outputs: leds, ledbar, values....

    screenshots:
    (see image properties of each control)
    led.php?lc=r&s=3&v=13mm red led on led.php?lc=r&s=3&v=03mm led off
    led.php?lc=g&s=5&v=15mm green led on

    ledbar_green_5.jpg
    ledbar_red_3.jpg

    Make your own analoge gauge. white, yellow, red or green. With or without caption,ect.
    horizontalgauge.php?v=-40horizontalgauge.php?v=30&;c=Outside&mc=y

    You can download this Pack 2 with examples (Updated with Display and gauge control)


    [img]http://www.tumbler.be/PINKPACK2/PINK/gauge.php?Color=yellow&MaxScale=6&Value=2.5&caption=Temp Outside[/img]

    More: http://www.tumbler.be/PINKPACK2

    Post Edited (Tumbler) : 10/27/2009 11:01:03 AM GMT
  • TumblerTumbler Posts: 323
    edited 2009-11-08 19:58
    No eod_punk, thank you for the link·for free php hosting! smile.gif

    A lot of people are using my server now for the images... freaked.gif , so please subscribe to another one...

    Or can parallax put the files on his server?

    Post Edited (Tumbler) : 11/8/2009 8:24:19 PM GMT
  • TumblerTumbler Posts: 323
    edited 2009-11-10 04:54
    If hotlinking is allowed, be my guest

    http://altlab.com/hotlinking.html
  • skylightskylight Posts: 1,915
    edited 2009-11-10 07:08
    Thanks Tumbler the meters and the rest·are of very high quality, well done

    edit:
    Hope you dont mind me saying but I've just spotted what may be a mistake on the Guage page on your website, where the pink guages source code shows colour=green instead of pink or red

    Post Edited (skylight) : 11/10/2009 8:16:14 AM GMT
  • TumblerTumbler Posts: 323
    edited 2009-11-10 07:29
    Well, thx

    I'm working on a better version.
    Looks like a panel version.
    The goal is to create a setup that creates a html table(s) with controls.
    Example see screenshot..

    screenshot.jpg

    Each control has his own parameters, like text, switches, meters, display...
    In this example, the switches are clickable... yihaaaa jumpin.gif
    It has only a annoying bug, screen flickers allot. but i'm working on it...
    ·
  • skylightskylight Posts: 1,915
    edited 2009-11-10 08:13
    Tumbler see edit of post above

    Very impressed with the panel above, good luck with it


    Post Edited (skylight) : 11/10/2009 8:29:53 AM GMT
  • TumblerTumbler Posts: 323
    edited 2009-11-10 08:40
    Skylight,

    are you talking about the gaugetest.html page?
    where you can see a red meter and the source shows color=green?

    if so, the backlight turns to red if there is an error.
    You can't take a red backlight for the meter. only a white, green, yellow, blue or no backlight.

    ·
  • skylightskylight Posts: 1,915
    edited 2009-11-10 09:00
    Oh I see, sorry just thought it might have been an typo error, Excellent work so far very impressed.
  • TumblerTumbler Posts: 323
    edited 2009-11-11 04:08
    eod_punk said...
    Is there any other was to off load the higher end functions that the PINK can't do but can be put on a full web server?
    · Sorry, but i don't get this?

    Do you mean flash controls?
  • skylightskylight Posts: 1,915
    edited 2009-11-11 05:48
    I created a web page on the pink that had an animated flash banner without any flashing (scuse the pun) problems.
  • TumblerTumbler Posts: 323
    edited 2009-11-11 09:46
    Can you post the source here? I'm trying to show a flash movie (embed) but i don't see it.
  • skylightskylight Posts: 1,915
    edited 2009-11-11 11:51
    Tumbler said...
    Can you post the source here? I'm trying to show a flash movie (embed) but i don't see it.
    Have you got all the associated files in the root folder?
    I will look for the source when I get home from work
  • TumblerTumbler Posts: 323
    edited 2009-11-11 11:57
    yes, i have

    i used the embed tag.
    When showing the page, i see nothing.
    When i take a look in the source of that page, there is an object (movie)
    when i select it and do a rightclick on it, it shows 'movie not loaded'

    Dunno what's wrong here...
  • skylightskylight Posts: 1,915
    edited 2009-11-11 12:20
    I remember having problems at first and kept getting similar with a blank banner, Have you tried reloading the files to the pink as i seem to remember it being temperamental with accepting the flash animation but it eventually worked.
  • skylightskylight Posts: 1,915
    edited 2009-11-11 23:51
    As promised here's the section of the source for the flash animation

    <p><center>
    <script type="text/javascript" src="swfobject.js"></script>
    <div id="id19905">
    Loading Flash movie...
    </div>

    <script type="text/javascript">
    var so19905 = new SWFObject("ftp://192.168.0.2/Lighting Bar2.swf", "movie19905", "750", "100", "6", "#FFFFFF");
    so19905.addParam("loop", "true");
    so19905.write("id19905");
    </script></center>

    <p>

    Pink Address


    eod_punk the pink can support flash animations, though not sure how big, the animation i uploaded was a banner full screen length approx an inch width at the top of the webpage

    Post Edited (skylight) : 11/12/2009 12:01:04 AM GMT
  • TumblerTumbler Posts: 323
    edited 2009-11-12 05:13
    @Skylight

    thanks for the code...
    ·can you post the swfobject javascript too?
    I have downloaded some, but not the correct one, there are a lot of swf.. javascript files.

    @eod_punk
    To create dynamic graphics you will need php. The pink is not supported php. So it wouldn't work.

    ·
  • TumblerTumbler Posts: 323
    edited 2009-11-12 06:51
    Tumbler said...
    @Skylight

    thanks for the code...
    ·can you post the swfobject javascript too?··
    I have downloaded some, but not the correct one, there are a lot of swf.. javascript files.
    i found a working one [noparse]:)[/noparse]

    @eod_punk
    To create dynamic graphics you will need php. The pink is not supported php. So it wouldn't work.

    Now i can show a swf movie, but the problem i have now is a IE cach problem.
    I have tried a lot of methods to avoid caching, but it doesn't work here.
    ex: with Action script, i look for the pink vars and show them in a textfield. this works.
    when i change the pink vars, the textfield in flash stay(s) the same.
    even after a refresh of the page.
    When i clear my cache, the vars are showing correct. So it's a cache problem. and i don't know how to fix this.
    adding the meta tags no cache or expires didn't work.

    maybe if there is another way, please let me know...
  • skylightskylight Posts: 1,915
    edited 2009-11-12 14:29
    Tumbler, it sounds like you are trying to do something like changing the text in the flash movie after reading variables from the pink, this is out of my scope of knowledge
    I used a package to create the movie, so any technical questions regarding the creation of the movie are beyond me

    can cache be turned off via your browser?

    not sure if this helps if you have firefox

    http://psychnet.psych.ucla.edu/tutorials/web-browser-issues-configuration/how-to-disable-your-browser-cache

    Post Edited (skylight) : 11/12/2009 2:50:11 PM GMT
  • TumblerTumbler Posts: 323
    edited 2009-11-12 14:48
    Well, my code is working here, but still have the cache problem. (when i clear the cache, the var is updating without a page refresh)



    ·
  • TumblerTumbler Posts: 323
    edited 2009-11-12 14:54
    Thx for the link skylight.
    Fixed it now, and working... [noparse]:)[/noparse]

    Modifying vars in another browserwindow will take effect in the swf movie now...

    ·
  • skylightskylight Posts: 1,915
    edited 2009-11-12 17:15
    glad to hear its working [noparse]:)[/noparse]
  • TumblerTumbler Posts: 323
    edited 2009-11-12 20:11
    Need testers here...

    1) attached a zip file, unpack it and·change your ip in the file flashtest.html and upload all files it to your pink.

    2) Disable caching in your browser [noparse]:([/noparse]howto: http://psychnet.psych.ucla.edu/tutorials/web-browser-issues-configuration/how-to-disable-your-browser-cache)

    3) Open flashtest.html in browser.

    4) Open http://your pink ip/VV_Show.htm· in another browser window.

    5) place both windows near eachother, so you can see the movie and the vars-page.

    6) Modify or·set Default value for ·Nb_var00
    ·········· (choose a value between 43 and 413)

    Now the needle has to move to new location.
    <!-- Edit -->
  • JohnR2010JohnR2010 Posts: 431
    edited 2010-07-23 23:07
    Tumbler, I just got PHP scripting installed on our IIS server. Your gauges look awesome both in firefox and on my iPhone v4!
    You ROCK my friend!! Thank you very much for posting this info!!! Awesome, Awesome, Awesome!! jumpin.gif
Sign In or Register to comment.