Skip to main content

Interface IStepperMotor

Represents an interface for controlling a stepper motor.

Assembly: Meadow.Contracts.dll​
View Source​
Declaration
public interface IStepperMotor : IPositionalMotor, IVariableSpeedMotor, IMotor

Properties​

StepsPerRevolution​

Gets the number of steps required for the stepper motor to complete one full revolution.

View Source​
Declaration
int StepsPerRevolution { get; }

Methods​

Rotate(int, RotationDirection, Frequency, CancellationToken)​

Rotates the stepper motor by the specified number of steps in the specified direction with the given frequency.

View Source​
Declaration
Task Rotate(int steps, RotationDirection direction, Frequency rate, CancellationToken cancellationToken = default)
Returns​

System.Threading.Tasks.Task

Parameters​
TypeNameDescription
System.Int32stepsThe number of steps to rotate the motor.
Meadow.Peripherals.RotationDirectiondirectionThe direction in which to rotate the motor.
Meadow.Units.FrequencyrateThe frequency of the steps at which to rotate the motor.
System.Threading.CancellationTokencancellationTokenA token to cancel the operation.