Author Topic: Servo Sliders  (Read 2817 times)

zero*gx

  • Full Member
  • ***
  • Posts: 116
    • zero*gx
Servo Sliders
« on: September 19, 2009, 10:47:12 PM »
Can someone help me with a javascript based slider for a servo widget?

i know that something similar was done for laserpup. except it provided x/y coordinates.

I know this will come up, so i will tell:

 my project is a web controlled robot. As part of the controls im building, i would like to use a slider ui, so other users wont need to know the pwm values to use.
zero*gx | imagineering solutions

iobridge

  • Administrator
  • Hero Member
  • *****
  • Posts: 668
    • ioBridge Support
Re: Servo Sliders
« Reply #1 on: September 20, 2009, 02:45:15 AM »
I love the idea of a slider.

I have never found a great one, but it you find one that you like I can take a look at it and try to ioBridge-ify it for a servo control.

JavaScript-based would be the easiest to work with, and one that does not require a whole librry to load would also be nice.

This one is nice, but requires Mootools as well.

http://www.phatfusion.net/slider/

I might try it though. It looks nice.
« Last Edit: September 20, 2009, 02:50:56 AM by iobridge »
ioBridge Support
Community Team

zero*gx

  • Full Member
  • ***
  • Posts: 116
    • zero*gx
Re: Servo Sliders
« Reply #2 on: September 20, 2009, 01:28:38 PM »
that was one of the few ive looked at. i really like that one also.

Ive found 2 so far...

http://www.dhtmlx.com/docs/products/dhtmlxSlider/index.shtml
this one even has theme options built in: http://www.dhtmlx.com/docs/products/dhtmlxSlider/samples/03_skins/01_slider_skin.html#code
The "ball", "skyblue" and the "bar" theme look the best.

Thid one also has themes:
http://www.softcomplex.com/products/tigra_slider_control/
http://www.softcomplex.com/products/tigra_slider_control/multiple_slider_designs_demo.html
The sliders that are 2nd & 3rd look the best.


Both of these support horizontal and vertical orientation. it would be important to have both.
If you'd like i can design the images.
zero*gx | imagineering solutions

zero*gx

  • Full Member
  • ***
  • Posts: 116
    • zero*gx
Re: Servo Sliders
« Reply #3 on: September 24, 2009, 08:16:36 PM »
any updates?
zero*gx | imagineering solutions

iobridge

  • Administrator
  • Hero Member
  • *****
  • Posts: 668
    • ioBridge Support
Re: Servo Sliders
« Reply #4 on: September 26, 2009, 03:17:52 AM »
I have experimented with one of these and had some success in FireFox but not any other browser. I will keep working until I get something for all of the browsers.

http://www.softcomplex.com/products/tigra_slider_control/

That was the one I some success with. That slider requires an html form to be present and that will cause some issues. I will keep cracking.
ioBridge Support
Community Team

zero*gx

  • Full Member
  • ***
  • Posts: 116
    • zero*gx
Re: Servo Sliders
« Reply #5 on: September 26, 2009, 03:33:13 AM »
ok... i wasn't aware of the html form requirement for that one... im windering if you could write the form using document.write.
zero*gx | imagineering solutions

zero*gx

  • Full Member
  • ***
  • Posts: 116
    • zero*gx
Re: Servo Sliders
« Reply #6 on: September 26, 2009, 03:35:59 AM »
ok...maybe not... i just looked at the source code... im guessing, if this does work at some point, that you would want to integrate this into your io.js file?

i know for me, qdding an html forms not a big deal, as i would imagine for many others... i would hope that any place hosting sites that supports javascript would also allow an html form
zero*gx | imagineering solutions

iobridge

  • Administrator
  • Hero Member
  • *****
  • Posts: 668
    • ioBridge Support
Re: Servo Sliders
« Reply #7 on: September 27, 2009, 02:56:36 AM »
We did it!

To try it out, create a variable position servo widget. Once it's created, you can select a "Style" - either "Input" or "Slider".

You can flip back and forth and it's backwards compatible - if you already have a variable servo position widget, you can simply select "Slider" as the style.

Let us know how it works for you...
ioBridge Support
Community Team

zero*gx

  • Full Member
  • ***
  • Posts: 116
    • zero*gx
Re: Servo Sliders
« Reply #8 on: September 27, 2009, 11:19:21 AM »
THANK YOU!!!!!!!!!

however, i can't tell you yet... :( as, it doesn't work on either firefox or safari on my mac.  My module is configured to be setup for servos.


ill check with windows in a minute....
zero*gx | imagineering solutions

zero*gx

  • Full Member
  • ***
  • Posts: 116
    • zero*gx
Re: Servo Sliders
« Reply #9 on: September 27, 2009, 11:21:28 AM »
i cant see it in firefox/internet explorer for windows.

in ie, i can highlight the control, it just is not displaying...
zero*gx | imagineering solutions

zero*gx

  • Full Member
  • ***
  • Posts: 116
    • zero*gx
Re: Servo Sliders
« Reply #10 on: September 27, 2009, 11:26:40 AM »
When i open the page in developer tools, its reporting this area as having a syntax error in the "n_value" line

 

Code: [Select]
var A_INIT = {
                                     's_form' : 0,
                                     's_name': 'ioInput_y2BMHxlnbM0N',
                                     'n_minValue' : 1000,
                                     'n_maxValue' : 2000,
                                     'n_value' : , SyntaxError: Parse error
                                     'n_step' : 5
                                     }

This might be part of the issue... also, when i go through to the iframed page, it doesn't display there.
zero*gx | imagineering solutions

iobridge

  • Administrator
  • Hero Member
  • *****
  • Posts: 668
    • ioBridge Support
Re: Servo Sliders
« Reply #11 on: September 27, 2009, 11:53:41 AM »
You got to have the module / servo online to use the widget. I will put a catch in there. It's failing, because the widget "n_value" is asking your servo for a position and it's not there.
ioBridge Support
Community Team

SouthForkWeb

  • Jr. Member
  • **
  • Posts: 50
  • Web Coding Master
    • South Fork Web Services
Re: Servo Sliders
« Reply #12 on: September 27, 2009, 08:08:00 PM »
I've tested the new Servo Sliders widget and it works great! Thanks so much!

The next question on people's minds is: What about customization?

Personally, I would like to use a different color scheme to integrate into my websites and applications. I do like the options presented at the website zerogx mentioned: http://www.softcomplex.com/products/tigra_slider_control/multiple_slider_designs_demo.html

Maybe in the future we could choose from one of those options, or even have the ability to create a slider of our own. All it would take is for the user to upload or link to two images. One image is the slider background and the other image is the actual slider part.

ioBridge, I realize this won't be that simple to implement, but hopefully in the future more options will become available. :D
http://SouthForkWeb.com - Professional Web Design and Hosting Services

iobridge

  • Administrator
  • Hero Member
  • *****
  • Posts: 668
    • ioBridge Support
Re: Servo Sliders
« Reply #13 on: September 27, 2009, 08:12:27 PM »
I think the new widget platform will allow for customizations of widgets much more easier than before. We will be experimenting.

As far as I can see, all of those options on their demo page will be implemented. It's really easy to add those in. Stay tuned.
ioBridge Support
Community Team

zero*gx

  • Full Member
  • ***
  • Posts: 116
    • zero*gx
Re: Servo Sliders
« Reply #14 on: September 27, 2009, 09:21:31 PM »
ok.... issue is on my end... that makes sense..

i havent tried this yet, but you might be able to style the sliders by wrapping the javascript in a a div, and then by styling the div in the css...

i will try this when i get a chance.
zero*gx | imagineering solutions