Class DigitalMotor

java.lang.Object
com.diozero.api.motor.DigitalMotor
All Implemented Interfaces:
java.io.Closeable, java.lang.AutoCloseable

public class DigitalMotor
extends java.lang.Object
implements java.io.Closeable
  • Constructor Summary

    Constructors 
    Constructor Description
    DigitalMotor​(int forwardGpio, int backwardGpio)  
    DigitalMotor​(GpioDeviceFactoryInterface deviceFactory, int forwardGpio, int backwardGpio)  
  • Method Summary

    Modifier and Type Method Description
    void backward()  
    void close()  
    void forward()  
    float getValue()
    Represents the speed of the motor as a floating point value between -1 (full speed backward) and 1 (full speed forward)
    boolean isActive()  
    void reverse()  
    void stop()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait