Package com.diozero.devices.motor
Class TB6612FNGDualMotorDriver
- java.lang.Object
-
- com.diozero.devices.motor.DualMotor
-
- com.diozero.devices.motor.TB6612FNGDualMotorDriver
-
- All Implemented Interfaces:
DeviceInterface
,AutoCloseable
public class TB6612FNGDualMotorDriver extends DualMotor
Toshiba TB6612FNG Dual Motor Driver. Dual bi-directional motors, each controlled by a PWM pin to control relative speed and forward / backward control pins to control motor direction (both on or both off == motor off). Such as this one from Pololu.
-
-
Constructor Summary
Constructors Constructor Description TB6612FNGDualMotorDriver(int motorAClockwiseControlGpio, int motorACounterClockwiseControlGpio, int motorAPwmGpio, int motorBClockwiseControlGpio, int motorBCounterClockwiseControlGpio, int motorBPwmGpio)
TB6612FNGDualMotorDriver(DigitalOutputDevice motorAClockwiseControlPin, DigitalOutputDevice motorACounterClockwiseControlPin, PwmOutputDevice motorAPwmControl, DigitalOutputDevice motorBClockwiseControlPin, DigitalOutputDevice motorBCounterClockwiseControlPin, PwmOutputDevice motorBPwmControl)
TB6612FNGDualMotorDriver(PwmOutputDeviceFactoryInterface pwmDeviceFactory, int motorAClockwiseControlGpio, int motorACounterClockwiseControlGpio, int motorAPwmGpio, int motorBClockwiseControlGpio, int motorBCounterClockwiseControlGpio, int motorBPwmGpio)
-
Method Summary
-
Methods inherited from class com.diozero.devices.motor.DualMotor
backward, backwardLeft, backwardRight, circleLeft, circleRight, close, forward, forwardLeft, forwardRight, getMotorA, getMotorB, getValues, reverseDirection, rotateLeft, rotateRight, setValues, stop
-
-
-
-
Constructor Detail
-
TB6612FNGDualMotorDriver
public TB6612FNGDualMotorDriver(int motorAClockwiseControlGpio, int motorACounterClockwiseControlGpio, int motorAPwmGpio, int motorBClockwiseControlGpio, int motorBCounterClockwiseControlGpio, int motorBPwmGpio) throws RuntimeIOException
- Throws:
RuntimeIOException
-
TB6612FNGDualMotorDriver
public TB6612FNGDualMotorDriver(PwmOutputDeviceFactoryInterface pwmDeviceFactory, int motorAClockwiseControlGpio, int motorACounterClockwiseControlGpio, int motorAPwmGpio, int motorBClockwiseControlGpio, int motorBCounterClockwiseControlGpio, int motorBPwmGpio) throws RuntimeIOException
- Throws:
RuntimeIOException
-
TB6612FNGDualMotorDriver
public TB6612FNGDualMotorDriver(DigitalOutputDevice motorAClockwiseControlPin, DigitalOutputDevice motorACounterClockwiseControlPin, PwmOutputDevice motorAPwmControl, DigitalOutputDevice motorBClockwiseControlPin, DigitalOutputDevice motorBCounterClockwiseControlPin, PwmOutputDevice motorBPwmControl)
-
-