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

Add a PWMInputDevice class #1126

Open
dancaugherty opened this issue Feb 24, 2024 · 1 comment
Open

Add a PWMInputDevice class #1126

dancaugherty opened this issue Feb 24, 2024 · 1 comment

Comments

@dancaugherty
Copy link

Add PWMInputDevice class to the class hierarchy

Some devices like the Parallax Feedback Servo have a PWM input for detecting state changes. In the case of this device, it has a line from an internal potentiometer to read the current angle of the servo.

One possible example of a class using this device:

from gpiozero import ParallaxFeedbackServo

pfs = ParallaxFeedbackServo(CONTROL_PIN, FEEDBACK_PIN)
pfs.set_starting_angle(0)
pfs.set_speed(1).until(degrees=-45)
@dancaugherty
Copy link
Author

For this particular device, here is an example making direct pigpio calls:
https://github.com/choeffer/360pibot/blob/master/lib_para_360_servo.py

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