Skip to content

Stepper motor assumes PWM pins are variable frequency #66

Closed
@rivques

Description

@rivques

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions