Skip to content

Stepper motor assumes PWM pins are variable frequency #66

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

Closed
rivques opened this issue Jan 5, 2023 · 0 comments · Fixed by #67
Closed

Stepper motor assumes PWM pins are variable frequency #66

rivques opened this issue Jan 5, 2023 · 0 comments · Fixed by #67

Comments

@rivques
Copy link

rivques commented Jan 5, 2023

When initializing a stepper with PWM pins, the stepper attempts to raise the PWM frequency to 2000 Hz if it is set to below 1500 Hz. This happens frequently as PWMOut pins default to 500 Hz. However, the stepper doesn't check that these values are writable (that the PWM pin's vairable_frequency is True) before writing, resulting in a very vague AttributeError when initialized with a default PWMOut. This should be pretty easy thing to check and throw a more descriptive error. The error happens on line 117 in stepper.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

Successfully merging a pull request may close this issue.

1 participant