Author Topic: Newbie Help Creating Widget  (Read 680 times)

Jimmy

  • Newbie
  • *
  • Posts: 34
Newbie Help Creating Widget
« on: February 11, 2009, 08:48:07 PM »
Hi everyone,

Let me begin by pointing out I’m a complete newbie to ioBridge, so my questions may seem a little simple, but I really need some help. I’m also pretty good with electronics and have created websites in html and flash so that may suggest my level of ability.

Ok, so I received my invitation code, my module and a servo controller smart board. I followed the very simple instructions and everything is up and running – nice one. So off I went to create a variable servo position control widget. I thought something nice and simple so that I could make a servo turn clockwise then anti-clockwise by hitting some sort of buttons.

The problem I’m having is there are no real instructions at ioBridge for newbie’s. The widget page loads, puts a little “Set” button at the top and some code to put in a website. There are some variables for “minimum” and “maximum” positions but that’s it. I’m not sure what any of these actually do and what I do next?

Just for my own experimentation, I put the number 1 in the box beside the “set” button. After I hit it, the number “1” appeared on the display on my module but nothing happened to the connected servo. By the way I have changed the "mode" setting on Channel 1 of my module to "servo".

A lot of you guys really do know what you’re doing and have created some fabulous projects. I just need some help starting off and then everything should fall into place. I’m guessing a good book on Javascript would be handy?

I’m also guessing that the basic widget code that has been created forms the basis of my project and that you build everything around it. Is that correct? Maybe someone has the basic source code I can use, just to get something up and working.

I’d really appreciate someone helping me out.

Thanks so much

Jimmy.


jason

  • Administrator
  • Hero Member
  • *****
  • Posts: 502
    • ioBridge.com
Re: Newbie Help Creating Widget
« Reply #1 on: February 11, 2009, 11:37:48 PM »
Yes, we are running a little behind in the documentation area.  We have a wiki installed, but haven't been able add any info yet.  It's been tough to strike a balance between adding new features, troubleshooting bugs and documentation (adding new features has won out).  Basically we've been using this forum as our unofficial documentation.

Not every project will require javascript.  It was our goal to provide a basic level of functionality directly from menu created widgets and the account dashboard.

Jason Winters
ioBridge Developer

Jimmy

  • Newbie
  • *
  • Posts: 34
Re: Newbie Help Creating Widget
« Reply #2 on: February 12, 2009, 12:51:44 AM »
Hi again Jason,

I think you probably spend more time trying to help everyone - it's a huge task you've got but you're doing a great job of it, thanks. Given there is very little documentation, can you recommend a website or a book of some sort that would help newbies with creating widgets?

Thanks

Jimmy.

geraldcor

  • Jr. Member
  • **
  • Posts: 56
Re: Newbie Help Creating Widget
« Reply #3 on: February 12, 2009, 02:36:13 PM »
Jimmy,

You should be able to control your servo from the main dashboard area or the widget page for that channel/smart board.

For servos, 1 will not do anything. Servos are controlled with pulse width modulation (PWM). I have a parallax servo that rotates 180 degress and my min and max values are 700 and 2000 respectively. So as you can see, you will need to enter a larger value into the "set" box in order for your servo to move (your values will vary depending on your servo but try 1000 and see what happens.) If your servo moves to a position and starts buzzing and vibrating, choose a different number that will back the servo off until it stops buzzing. This will help you find your min/max values.

see http://www.iobridge.net/forum/index.php/topic,12.0.html for some helpful servo points as well.

As far as more advanced Javascript programming if you really want to go that route, look at various posts here for examples (especially the examples posted by Jason for new widget functionality http://www.iobridge.net/forum/index.php/topic,81.0.html ) or go to http://www.w3schools.com/JS/default.asp for basic javascript tutorials. I'm not sure about any other in depth resources other than google searches.

Hope that clears things up a bit.

Greg