Skip to main content

Class A4988

This class is for the A4988 Stepper Motor Driver

Assembly: A4988.dll
View Source
public class A4988 : IDisposable

Implements:
System.IDisposable

Properties

StepAngle

Gets or sets the angle, in degrees, of one step for the connected stepper motor

View Source
public Angle StepAngle { get; set; }

RotationSpeedDivisor

Divisor used to adjust rotational speed of the stepper motor

View Source
public int RotationSpeedDivisor { get; set; }

Direction

Sets or gets the direction of rotation used for Step or Rotate methods

View Source
public RotationDirection Direction { get; set; }

StepDivisor

Divisor for micro-stepping a motor
This requires the three micro-step control lines to be connected to the motor

View Source
public StepDivisor StepDivisor { get; set; }

StepsPerRevolution

Gets the number of steps/micro-steps in the current configuration required for one 360-degree revolution

View Source
public int StepsPerRevolution { get; }

IsDisposed

Is the object disposed

View Source
public bool IsDisposed { get; }

Methods

Rotate(float, RotationDirection)

Rotates the stepper motor a specified number of degrees

View Source
public void Rotate(float degrees, RotationDirection direction)
Parameters
TypeNameDescription
System.SingledegreesDegrees to rotate
Meadow.Peripherals.RotationDirectiondirectionDirection of rotation

Rotate(float)

Rotates the stepper motor a specified number of degrees

View Source
public void Rotate(float degrees)
Parameters
TypeNameDescription
System.SingledegreesDegrees to rotate

Step(int, RotationDirection)

Rotates the stepper motor a specified number of steps (or microsteps)

View Source
public void Step(int count, RotationDirection direction)
Parameters
TypeNameDescription
System.Int32countNumber of steps to rotate
Meadow.Peripherals.RotationDirectiondirectionDirection of rotation

Step(int)

Rotates the stepper motor a specified number of steps (or microsteps)

View Source
public void Step(int count)
Parameters
TypeNameDescription
System.Int32countNumber of steps to rotate

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

View Source
public void Dispose()

Dispose(bool)

Dispose of the object

View Source
protected virtual void Dispose(bool disposing)
Parameters
TypeNameDescription
System.BooleandisposingIs disposing

Implements

  • System.IDisposable