Characteristic | Locus |
---|---|
Inheritance | object Motor > StepperMotor |
Inherited Members | Motor.pca9685 object.Equals(object) object.Equals(object, object) object.GetHashCode() object.GetType() object.MemberwiseClone() object.ReferenceEquals(object, object) object.ToString() |
Namespace | Meadow.Foundation.FeatherWings |
Assembly | MotorWing.dll |
Syntax
public class StepperMotor : Motor
Constructors
StepperMotor(int, int, Pca9685)
Creates a Stepper motor objet un-initialized
Declaration
public StepperMotor(int steps, int num, Pca9685 pca9685)
Parameters
Type | Name | Description |
---|---|---|
int | steps | The number of steps per revolution |
int | num | The Stepper motor port |
Pca9685 | pca9685 | The PCS968 diver object |
Methods
SetSpeed(short)
Set the delay for the Stepper Motor speed in RPM
Declaration
public override void SetSpeed(short rpm)
Parameters
Type | Name | Description |
---|---|---|
short | rpm | The desired RPM |
Overrides
Step(Direction, Style)
Move the stepper one step only
Declaration
protected virtual int Step(Direction direction, Style style)
Parameters
Type | Name | Description |
---|---|---|
Direction | direction | The direction to go |
Style | style | How to perform the step |
Returns
Type | Description |
---|---|
int | The current location |
Step(int, Direction, Style)
Move the stepper with the given RPM
Declaration
protected virtual void Step(int steps, Direction direction, Style style)
Parameters
Type | Name | Description |
---|---|---|
int | steps | The number of steps to move |
Direction | direction | The direction to go |
Style | style | How to perform the step |
Step(int, Style)
Move the stepper with the given RPM
Declaration
public virtual void Step(int steps = 1, Style style = Style.SINGLE)
Parameters
Type | Name | Description |
---|---|---|
int | steps | The number of steps to move. Negative number moves the stepper backwards |
Style | style | How to perform the step |