Go Down

Topic: 0016 servo library-How to set min and max pulse? (Read 2516 times) previous topic - next topic

newtoduino

Hi,
is the "The Software Servo Library" included in to the 0016 installation?

If it is, how to set min and max pulse value?

including a command like this:

g_servo1.setMinimumPulse(900)

i get :"error: 'class Servo' has no member named 'setMinimumPulse".

I think that the default mina nd max pulse  values defined in the library are not god for my hitec hs55-

Any hint?

tks

mem

#1
Jun 09, 2009, 10:35 pm Last Edit: Jun 09, 2009, 10:36 pm by mem Reason: 1
Why not use the hardware servo library?

or, if you need to drive more than 2 servos, you can use MegaServo: http://www.arduino.cc/playground/Code/MegaServo

clamburger

I am running into similar problems, and have been attempting to reinstall the standard Servo library, but I cannot seem to get it to work. Instead, I have been using the MegaServo library, which seems to work, I am just not sure why (I am on a Duemillanove and 0013).

Is the MagaServo and standard servo library identical when running on a Duemillanove?

Also, in a previous post of yours, mem, you mention the use of the refresh function to ensure you are getting the best performance out of the servo you are using. Is the post that I am reading that information from outdated and the refresh timer is built into the new libraries? Any feedback would be awesome!

mem


Software servo code needs to be refreshed every 20 milliseconds or so, otherwise the servo performance will suffer. This requirement complicates the design of a sketch, particularly if the application needs to wait for things to happen. Using a hardware servo library eliminates the need to call a refresh function  in your sketch (this is done internally by the hardware).

MegaServo is a drop-in replacement for the standard servo library and can use identical code. See the playground for more information on its additional features.

Go Up