Package com.diozero.devices.motor
Interface MotorInterface
- All Superinterfaces:
AutoCloseable
,Closeable
- All Known Implementing Classes:
MotorBase
,PiconZeroMotor
,PwmMotor
,TB6612FNGMotor
public interface MotorInterface extends Closeable
-
Method Summary
Modifier and Type Method Description void
addListener(MotorEventListener listener)
void
backward(float speed)
void
forward(float speed)
float
getValue()
boolean
isActive()
void
removeListener(MotorEventListener listener)
void
reverse()
void
setValue(float value)
void
stop()
void
whenBackward(Action action)
void
whenForward(Action action)
void
whenStop(Action action)
-
Method Details
-
forward
- Throws:
RuntimeIOException
-
backward
- Throws:
RuntimeIOException
-
stop
- Throws:
RuntimeIOException
-
reverse
- Throws:
RuntimeIOException
-
getValue
- Throws:
RuntimeIOException
-
setValue
- Throws:
RuntimeIOException
-
isActive
- Throws:
RuntimeIOException
-
whenForward
-
whenBackward
-
whenStop
-
addListener
-
removeListener
-