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 ServoDriver
public int getServoPulseWidth()
ServoDriver
getServoPulseWidth
in interface ServoDriver
public void setServoPulseWidth(int position)
ServoDriver
ServoDriver.getServoPulseResolution()
.
Zero value may mean that this driver is currently not producing pulse.
Negative values may, generally, be invalid.setServoPulseWidth
in interface ServoDriver
position
- pulse width in resolution read from ServoDriver.getServoPulseResolution()
public int getServoPulseResolution()
ServoDriver
ServoDriver.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 ServoDriver
protected void updateResolution()
Copyright © 2012–2014 Pi4J. All rights reserved.