public class PCA9685GpioServoDriver extends Object implements ServoDriver
| Constructor and Description |
|---|
PCA9685GpioServoDriver(PCA9685GpioProvider provider,
Pin pin) |
| Modifier and Type | Method and Description |
|---|---|
Pin |
getPin() |
PCA9685GpioProvider |
getProvider() |
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.
|
protected void |
setPin(Pin pin) |
protected void |
setProvider(PCA9685GpioProvider provider) |
void |
setServoPulseWidth(int position)
Sets servo pulse width in resolution provided by
ServoDriver.getServoPulseResolution(). |
protected void |
updateResolution() |
public PCA9685GpioServoDriver(PCA9685GpioProvider provider, Pin pin)
protected void setProvider(PCA9685GpioProvider provider)
public PCA9685GpioProvider getProvider()
protected void setPin(Pin pin)
public Pin getPin()
getPin in interface ServoDriverpublic int getServoPulseWidth()
ServoDrivergetServoPulseWidth in interface ServoDriverpublic void setServoPulseWidth(int position)
ServoDriverServoDriver.getServoPulseResolution().
Zero value may mean that this driver is currently not producing pulse.
Negative values may, generally, be invalid.setServoPulseWidth in interface ServoDriverposition - 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 ServoDriverprotected void updateResolution()
Copyright © 2012–2019 Pi4J. All rights reserved.