public class Servo extends GpioDevice
pinNumber
Constructor and Description |
---|
Servo(int pinNumber,
int pwmFrequency,
float initialPulseWidthMs) |
Servo(PwmOutputDeviceFactoryInterface pwmDeviceFactory,
int pinNumber,
int pwmFrequency,
float initialPulseWidthMs) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
float |
getPulseWidthMs()
Get the current servo pulse width in milliseconds
|
int |
getPwmFrequency() |
void |
setPulseWidthMs(float pulseWidthMs)
Set the servo pulse width in milliseconds
|
getPinNumber
public Servo(int pinNumber, int pwmFrequency, float initialPulseWidthMs) throws RuntimeIOException
RuntimeIOException
public Servo(PwmOutputDeviceFactoryInterface pwmDeviceFactory, int pinNumber, int pwmFrequency, float initialPulseWidthMs) throws RuntimeIOException
RuntimeIOException
public void close()
public int getPwmFrequency()
public float getPulseWidthMs()
public void setPulseWidthMs(float pulseWidthMs)
pulseWidthMs
- Servo pulse width (milliseconds)Copyright © 2016 mattjlewis. All rights reserved.