|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.wpi.first.wpilibj.SensorBase
edu.wpi.first.wpilibj.PWM
edu.wpi.first.wpilibj.Servo
public class Servo
Standard hobby style servo. The range parameters default to the appropriate values for the Hitec HS-322HD servo provided in the FIRST Kit of Parts in 2008.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class edu.wpi.first.wpilibj.PWM |
|---|
PWM.PeriodMultiplier |
| Field Summary |
|---|
| Fields inherited from class edu.wpi.first.wpilibj.PWM |
|---|
kDefaultMinPwmHigh, kDefaultPwmPeriod, kPwmDisabled |
| Fields inherited from class edu.wpi.first.wpilibj.SensorBase |
|---|
kAnalogChannels, kAnalogModules, kDigitalChannels, kPwmChannels, kRelayChannels, kSolenoidChannels, kSolenoidModules, kSystemClockTicksPerMicrosecond, n_simProperties |
| Constructor Summary | |
|---|---|
Servo(int channel)
Constructor that assumes the default digital module. |
|
Servo(int slot,
int channel)
Constructor that specifies the digital module. |
|
| Method Summary | |
|---|---|
double |
get()
Get the servo position. |
double |
getAngle()
Get the servo angle. |
void |
set(double value)
Set the servo position. |
void |
setAngle(double degrees)
Set the servo angle. |
| Methods inherited from class edu.wpi.first.wpilibj.PWM |
|---|
enableDeadbandElimination, free, getChannel, getModuleNumber, getPosition, getRaw, getSpeed, setBounds, setPeriodMultiplier, setPosition, setRaw |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Servo(int channel)
channel - The PWM channel on the digital module to which the servo is attached.
public Servo(int slot,
int channel)
slot - The slot in the chassis that the digital module is plugged into.channel - The PWM channel on the digital module to which the servo is attached.| Method Detail |
|---|
public void set(double value)
value - Position from 0.0 to 1.0.public double get()
public void setAngle(double degrees)
degrees - The angle in degrees to set the servo.public double getAngle()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||