public class DigitalMotor extends Object implements Closeable
Constructor and Description |
---|
DigitalMotor(int forwardPin,
int backwardPin) |
Modifier and Type | Method and 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() |
public DigitalMotor(int forwardPin, int backwardPin) throws RuntimeIOException
RuntimeIOException
public void close()
close
in interface Closeable
close
in interface AutoCloseable
public void forward() throws RuntimeIOException
RuntimeIOException
public void backward() throws RuntimeIOException
RuntimeIOException
public void stop() throws RuntimeIOException
RuntimeIOException
public void reverse() throws RuntimeIOException
RuntimeIOException
public boolean isActive() throws RuntimeIOException
RuntimeIOException
public float getValue() throws RuntimeIOException
RuntimeIOException
- if an I/O error occursCopyright © 2016 mattjlewis. All rights reserved.