-
Notifications
You must be signed in to change notification settings - Fork 60
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
ServoTrim assumes 180 degree rotation #197
Comments
EAGrahamJr
added a commit
to EAGrahamJr/diozero
that referenced
this issue
Apr 14, 2024
Fixes mattjlewis#197 The default mapping would turn out non-zero based angle values because the ddefault assumption is for a 180-degree motor. This new constructor set up the servo to turn from it's baseline 0 degrees to whatever maximum is supplied. Also added a definition for MG90S metal-gear micro-servos.
I don't believe this constructor assumes 180 degree range of movement as per the new constructor comment:
|
Well, I'm an idiot -- I was putting the same value for the 90 degree as the mid-point, so of course it was coming out odd. At least my new constructor is a little easier to use? 😊 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It took a while to figure out why my gear ratios were not matching real-world mappings until I realized that the servos I'm using (MG90s) move more than 180 degrees with an appropriate pulse-width setting, but the
ServoTrim
class assumes that a servo cannot move more than 180 degrees.Thus,
ServoTrim
should have additional constructors to cover these additional parameters (and adjust all the things accordingly).The text was updated successfully, but these errors were encountered: