Open
Description
Connected to a Futaba S3305 servo, the servo diddn't move. We connected an oscilloscope to the pin and found that there was no signal being sent on the pin. Through a little trial and error we figured that immediately setting the pin to 0 did not allow enough time for anything to be sent - inserting a short sleep between writing the duty cycle and pulling the pin to 0 allowed the signal to be sent and the servo to be activated (verified via the oscilloscope first)
self.pin.write_analog(duty)
"""
We used a large value here to allow the servo time to complete its motion rather
than have a small one here and another in the main loop, but for library code this should
be smaller and the calling code account for the servo rotational speed
"""
sleep(1000)
self.pin.write_digital(0) # turn the pin off
Metadata
Metadata
Assignees
Labels
No labels