C# Class CyrusBuilt.MonoPi.Components.Motors.StepperMotorBase

A base class for stepper motor components.
Inheritance: MotorBase, IStepperMotor
ファイルを表示 Open project: cyrusbuilt/MonoPi

Public Methods

Method Description
Rotate ( Double revolutions ) : void

Rotate the specified revolutions.

SetStepInterval ( Int32 millis ) : void

Sets the step interval.

SetStepInterval ( Int32 millis, Int32 nanoseconds ) : void

Sets the step interval.

Step ( Int32 steps ) : void

Step the motor the specified steps.

Protected Methods

Method Description
OnMotorRotationStarted ( MotorRotateEventArgs e ) : void

Raises the motor rotation started event.

OnMotorRotationStopped ( EventArgs e ) : void

Raises the motor rotation stopped event.

StepperMotorBase ( ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Motors.StepperMotorBase class. This is the default constructor.

Method Details

OnMotorRotationStarted() protected method

Raises the motor rotation started event.
protected OnMotorRotationStarted ( MotorRotateEventArgs e ) : void
e MotorRotateEventArgs /// The event arguments. ///
return void

OnMotorRotationStopped() protected method

Raises the motor rotation stopped event.
protected OnMotorRotationStopped ( EventArgs e ) : void
e System.EventArgs /// The event arguments. ///
return void

Rotate() public method

Rotate the specified revolutions.
public Rotate ( Double revolutions ) : void
revolutions Double /// The number of revolutions to rotate. ///
return void

SetStepInterval() public method

Sets the step interval.
public SetStepInterval ( Int32 millis ) : void
millis System.Int32 /// The milliseconds between steps. ///
return void

SetStepInterval() public method

Sets the step interval.
public SetStepInterval ( Int32 millis, Int32 nanoseconds ) : void
millis System.Int32 /// The milliseconds between steps. ///
nanoseconds System.Int32 /// The nanoseconds between steps. ///
return void

Step() public abstract method

Step the motor the specified steps.
public abstract Step ( Int32 steps ) : void
steps System.Int32 /// The number of steps to rotate. ///
return void

StepperMotorBase() protected method

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Motors.StepperMotorBase class. This is the default constructor.
protected StepperMotorBase ( ) : System
return System