public class RPIServoBlasterServoDriver extends Object implements ServoDriver
| Modifier and Type | Field and Description |
|---|---|
protected int |
index |
protected String |
pinString |
protected RPIServoBlasterProvider |
provider |
protected Pin |
servoPin |
protected int |
servoPosition |
| Modifier | Constructor and Description |
|---|---|
protected |
RPIServoBlasterServoDriver(Pin servoPin,
int index,
String pinString,
RPIServoBlasterProvider provider) |
| Modifier and Type | Method and Description |
|---|---|
Pin |
getPin() |
int |
getServoPulseResolution()
This is read only value driver is to provide to users of this class.
|
int |
getServoPulseWidth()
This method returns current servo pulse width.
|
void |
setServoPulseWidth(int width)
Sets servo pulse width in resolution provided by
ServoDriver.getServoPulseResolution(). |
protected Pin servoPin
protected int index
protected String pinString
protected int servoPosition
protected RPIServoBlasterProvider provider
protected RPIServoBlasterServoDriver(Pin servoPin, int index, String pinString, RPIServoBlasterProvider provider) throws IOException
IOExceptionpublic int getServoPulseWidth()
ServoDrivergetServoPulseWidth in interface ServoDriverpublic void setServoPulseWidth(int width)
ServoDriverServoDriver.getServoPulseResolution().
Zero value may mean that this driver is currently not producing pulse.
Negative values may, generally, be invalid.setServoPulseWidth in interface ServoDriverwidth - pulse width in resolution read from ServoDriver.getServoPulseResolution()public int getServoPulseResolution()
ServoDriverServoDriver.getServoPulseWidth() and ServoDriver.setServoPulseWidth(int)
methods are operating in. Resolution is provided in 1/n (ms) where value returned
from this method is n.getServoPulseResolution in interface ServoDriverpublic Pin getPin()
getPin in interface ServoDriverCopyright © 2012–2019 Pi4J. All rights reserved.