StepperMotor()

StepperMotor sensor module

new StepperMotor()

Extends

Members

protocol

getter of protocol

Methods

direction(type) → {Instance}

set direction of stepper motor rotate

Parameters:
Name Type Description
type Number

type is 1 or -1. 1 means rotate clockwise, and -1 means anticlockwise

Returns:
Instance -

@this

distance(speed) → {Instance}

set distance

Parameters:
Name Type Description
speed Number
Returns:
Instance -

@this

reverse() → {Instance}

run reversely

Returns:
Instance -

@this

run()

run

Overrides:

setStop() → {Instance}

Stop motor

Returns:
Instance -

the motor instance

Inherited From:

speed(speed) → {Instance}

Set speed to the motor

Parameters:
Name Type Description
speed Number
Returns:
Instance -

the motor instance

Inherited From: