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
Dual bi-directional motor controlled by a single PWM pin and separate forward / backward GPIO pins
Toshiba TB6612FNG Dual Motor Driver such as this one from Pololu: https://www.pololu.com/product/713
-
Constructor Summary
Constructors Constructor Description TB6612FNGDualMotorDriver(int leftMotorClockwiseControlGpio, int leftMotorCounterClockwiseControlGpio, int leftMotorPwmGpio, int rightMotorClockwiseControlGpio, int rightMotorCounterClockwiseControlGpio, int rightMotorPwmGpio)
TB6612FNGDualMotorDriver(DigitalOutputDevice leftMotorClockwiseControlPin, DigitalOutputDevice leftMotorCounterClockwiseControlPin, PwmOutputDevice leftMotorPwmControl, DigitalOutputDevice rightMotorClockwiseControlPin, DigitalOutputDevice rightMotorCounterClockwiseControlPin, PwmOutputDevice rightMotorPwmControl)
TB6612FNGDualMotorDriver(PwmOutputDeviceFactoryInterface pwmDeviceFactory, int leftMotorClockwiseControlGpio, int leftMotorCounterClockwiseControlGpio, int leftMotorPwmGpio, int rightMotorClockwiseControlGpio, int rightMotorCounterClockwiseControlGpio, int rightMotorPwmGpio)
-
Method Summary
Methods inherited from class com.diozero.devices.motor.DualMotor
backward, backwardLeft, backwardRight, circleLeft, circleRight, close, forward, forwardLeft, forwardRight, getLeftMotor, getRightMotor, getValues, reverse, rotateLeft, rotateRight, setValues, stop
-
Constructor Details
-
TB6612FNGDualMotorDriver
public TB6612FNGDualMotorDriver(int leftMotorClockwiseControlGpio, int leftMotorCounterClockwiseControlGpio, int leftMotorPwmGpio, int rightMotorClockwiseControlGpio, int rightMotorCounterClockwiseControlGpio, int rightMotorPwmGpio) throws RuntimeIOException- Throws:
RuntimeIOException
-
TB6612FNGDualMotorDriver
public TB6612FNGDualMotorDriver(PwmOutputDeviceFactoryInterface pwmDeviceFactory, int leftMotorClockwiseControlGpio, int leftMotorCounterClockwiseControlGpio, int leftMotorPwmGpio, int rightMotorClockwiseControlGpio, int rightMotorCounterClockwiseControlGpio, int rightMotorPwmGpio) throws RuntimeIOException- Throws:
RuntimeIOException
-
TB6612FNGDualMotorDriver
public TB6612FNGDualMotorDriver(DigitalOutputDevice leftMotorClockwiseControlPin, DigitalOutputDevice leftMotorCounterClockwiseControlPin, PwmOutputDevice leftMotorPwmControl, DigitalOutputDevice rightMotorClockwiseControlPin, DigitalOutputDevice rightMotorCounterClockwiseControlPin, PwmOutputDevice rightMotorPwmControl)
-