Closed JoeSc closed 1 year ago
It seems that you should use detach() instead of writing the PWM to 0.
The other configuration you should look at is the extra parameters to attach() that let you set the uS timing for the bounds of the servo pulse.
It seems that you should use detach() instead of writing the PWM to 0.
Does it make sense to teardown the Timers when I might want to immediately move it again(therefore requiring the timer to be re-setup)
The other configuration you should look at is the extra parameters to attach() that let you set the uS timing for the bounds of the servo pulse.
The minimum uS timing I can pass to the servo is bounded by the following in attach()
#define MIN_PULSE_WIDTH 500
...
if (min < MIN_PULSE_WIDTH) // ensure pulse width is valid
min = MIN_PULSE_WIDTH;
hmm good point, ok.
added to 1.1.0
It may be useful to release the servos(so that the motor inside the servo does not burn up).
Use case is a latch. Drive the servo 0 degrees(the servo may only be able to reach, for example, 40 degrees) for 100ms then release the servo. To unlatch drive the servo 180 degrees(again the servo may only be able to reach 130 degrees) for 100ms then release the servo