Package com.diozero.devices
Class PiconZeroMotor
java.lang.Object
com.diozero.api.motor.MotorBase
com.diozero.devices.PiconZeroMotor
- All Implemented Interfaces:
MotorInterface
,java.io.Closeable
,java.lang.AutoCloseable
public class PiconZeroMotor extends MotorBase
-
Constructor Summary
Constructors Constructor Description PiconZeroMotor(PiconZero piconZero, int motor)
-
Method Summary
Methods inherited from class com.diozero.api.motor.MotorBase
addListener, removeListener, reverse, setValue, valueChanged, whenBackward, whenForward, whenStop
-
Constructor Details
-
Method Details
-
forward
- Throws:
RuntimeIOException
-
backward
- Throws:
RuntimeIOException
-
stop
- Throws:
RuntimeIOException
-
getValue
Get the relative output value for the motor- Returns:
- -1 for full reverse, 1 for full forward, 0 for stop
- Throws:
RuntimeIOException
-
isActive
- Throws:
RuntimeIOException
-
close
public void close() throws java.io.IOException- Throws:
java.io.IOException
-