(Update new “wiring.c” and “wiring.h” for Arduino 0015)
Since Servo library published with Arduino 0012 package and seem to be problem to old Servo library code. Because new library which derive from ServoTimer on Playground and replace old “Servo” name.
new “Servo” library using built-in Timer for automatic refresh signal pulse which more ease to use, but limited to pin 9 and 10 only (that capable only 2 motors).
old “Servo” library published on Playground using derive work from Wiring project which connect to any pin on arduino, upto 20 instance (pin 0 to pin 19).
and code always called Servo.refresh(); at least every 50ms. for continue signal send and get work properly.
then I’d remake this library again and rename to “SoftwareServo” avoid name conflict to 0012 Servo library
you can download library below link
unzip file on current Arduino folder, and overwrite “wiring.c” and “wiring.h” because I’d add new millisSet(unsigned long); function, for direct millis() counter can be set or clear to zero (useful for timer applcation)
on SoftwareServo library, I’d also put two example,
one is “sweep” : just control Servo on pin2 looping
another is “SerialServo” : control Servo motro by Serial Monitor command, adapt form example on playground. simple command key are listed below
“A” for select motor on pin2
“B” for select motor on pin4
“0″ to “9″ control recent selected motor’s position from 0 to 180 degree, each value step represented to position multiply by 20 degree.
for more information on library, Credit and refer to original Playground library page here http://www.arduino.cc/playground/ComponentLib/Servo
Post by K.Worapoht, dev [at] avride.com