Trait StepperMotor
Source pub trait StepperMotor {
type Error;
// Required methods
fn step(&mut self, this_step: u32) -> Result<(), Self::Error>;
fn clear(&mut self) -> Result<(), Self::Error>;
}
Expand description
Generic stepper “coil driver” interface (no_std, embedded-hal compatible).
Drive to a specific step (implementation decides sequence).
Must take a step number, and use this to determine the coil sequence and energise accordingly
Equivalent to the Arduino stepMotor function.
De-energize all coils.
Implementors should set all coil pins to low.
Arduino stepper does not have this function, but it may be useful for drivers with no enable-disable