This a sample signal
There is another overloaded Servo.attach function (used to attach servo to the pin) with 3 arguments:
servo.attach(pin, min, max)
(min,max) are the pulse minimum and maximum widths in microseconds. Default values are 544us and 2400us(you can also check them in the <Arduino-dir>\libraries\Servo\Servo.h file, MIN_PULSE_WIDTH and MAX_PULSE_WIDTH macros). Most of hobby servo motors have those default values, but if your servo doesn't work, then you need to dig into the documentation to find out right values. This Servo library takes minimum 20ms for signal period: see <Arduino-dir>\libraries\Servo\Servo.h file:#define REFRESH_INTERVAL 20000 // minumim time to refresh servos in microseconds
That's all.
No comments:
Post a Comment