motorhat

module:MotorHat~ motorhat

motorHat controller

Needs to be initialized with init().

Source:
See:

Members

(static, constant) dclib :module:MotorHat/DC

DC Controller Factory

Type:
Source:

(static, constant) servolib :module:MotorHat/Servo

Servo Controller Factory

Type:
Source:

(static, constant) stepperlib :module:MotorHat/Stepper

Stepper Controller Factory

Type:
Source:

(constant) dcs :Array.<module:MotorHat/DC~dC>

Array of initialized DC controllers

Type:
  • Array.<module:MotorHat/DC~dC>
Source:

(constant) servos :Array.<module:MotorHat/Servo~servo>

Array of initialized Servo controllers

Type:
Source:

(constant) steppers :Array.<module:MotorHat/Stepper~stepper>

Array of initialized Stepper controllers

Type:
Source:

Methods

init(cb) → {module:MotorHat~motorhat}

Initialize the motorHat library instance.

Instantiates the individual Motor/Servo/Stepper controllers and initializes them.

Parameters:
Name Type Description
cb

Optional node style callback for asynch initialization

Source:
Returns:

Returns initialized motorHat object (self), either directly
or in second parameter to callback if callback provided, to enable chaining.

Type
module:MotorHat~motorhat