B4J Programming Press on the image to return to the main documentation page.

rAdafruitMotorShieldV2

List of types:

AdafruitDCMotor
AdafruitMotorShield
AdafruitStepperMotor

AdafruitDCMotor


Events:

None

Members:


  COMMAND_BACKWARD As Byte

  COMMAND_FORWARD As Byte

  COMMAND_RELEASE As Byte

  Initialize (MotorShield As AdafruitMotorShield, PortNumber As Byte) As void

  Run (Command As Byte) As void

  Speed As Byte [write only]

Members description:

COMMAND_BACKWARD As Byte
COMMAND_FORWARD As Byte
COMMAND_RELEASE As Byte
Initialize (MotorShield As AdafruitMotorShield, PortNumber As Byte) As void
Initializes the object.
MotorShield - An initialized MotorShield object.
PortNumber - Motor port number.
Run (Command As Byte) As void
Command - One of the COMMAND constants.
Speed As Byte [write only]
Sets the speed (0 - 255).

AdafruitMotorShield


Events:

None

Members:


  Initialize (Address As Byte, Frequency As UInt) As void

  SetPin (Pin As Byte, Value As Boolean) As void

  SetPWM (Pin As Byte, Value As UInt) As void

Members description:

Initialize (Address As Byte, Frequency As UInt) As void
Initializes the object.
Address - I2C address. Default value is 0x60.
Frequency - Frequency in hz. Default value is 1600.
SetPin (Pin As Byte, Value As Boolean) As void
SetPWM (Pin As Byte, Value As UInt) As void

AdafruitStepperMotor


Events:

None

Members:


  DIR_BACKWARD As Byte

  DIR_FORWARD As Byte

  DIR_RELEASE As Byte

  Initialize (MotorShield As AdafruitMotorShield, Steps As UInt, PortNumber As Byte) As void

  OneStep (Dir As Byte, Style As Byte) As void

  Release As void

  Speed As UInt [write only]

  Step (Steps As UInt, Dir As Byte, Style As Byte) As void

  STYLE_DOUBLE As Byte

  STYLE_INTERLEAVE As Byte

  STYLE_MICROSTEP As Byte

  STYLE_SINGLE As Byte

Members description:

DIR_BACKWARD As Byte
DIR_FORWARD As Byte
DIR_RELEASE As Byte
Initialize (MotorShield As AdafruitMotorShield, Steps As UInt, PortNumber As Byte) As void
Initializes the object.
MotorShield - An initialized MotorShield object.
Steps - Number of steps per revolution.
PortNumber - Stepper port number.
OneStep (Dir As Byte, Style As Byte) As void
Dir - One of the DIR constants.
Style - One of the STYLE constants.
Release As void
Speed As UInt [write only]
Sets the speed (RPM)/
Step (Steps As UInt, Dir As Byte, Style As Byte) As void
Steps - Number of steps.
Dir - One of the DIR constants.
Style - One of the STYLE constants.
STYLE_DOUBLE As Byte
STYLE_INTERLEAVE As Byte
STYLE_MICROSTEP As Byte
STYLE_SINGLE As Byte

Top