Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PWM pulse not sent to servo as pin immediately pulled to 0 #4

Open
Spiral90210 opened this issue Jul 12, 2018 · 0 comments
Open

PWM pulse not sent to servo as pin immediately pulled to 0 #4

Spiral90210 opened this issue Jul 12, 2018 · 0 comments

Comments

@Spiral90210
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant