|
SunSPOT API V4.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.spot.sensorboard.peripheral.Servo
public class Servo
A basic servo. Note: whenever a servo is active, deep sleep will not happen.
| Constructor Summary | |
|---|---|
Servo(IOutputPin pin)
Initialize a servo. |
|
| Method Summary | |
|---|---|
IServoController |
getController()
Return the servocontroller of this servo. |
int |
getValue()
Return the current value of this servos pulse length. |
void |
setBounds(int low,
int high)
Specify the bounds that this servo can operate in. |
void |
setPosition(float position)
Set the relative position of this servo. |
void |
setValue(int val)
Set the pulse width size of this servo. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Servo(IOutputPin pin)
pin - the pin that this servo is attached to| Method Detail |
|---|
public void setValue(int val)
setValue in interface IServoval - pulse width in microsecondspublic int getValue()
getValue in interface IServopublic void setPosition(float position)
setPosition in interface IServoposition - percentage value to set the servo to
public void setBounds(int low,
int high)
setPosition method.
setBounds in interface IServolow - pulse width value in microsecondshigh - pulse width value in microsecondspublic IServoController getController()
getController in interface IServo
|
SunSPOT API V4.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||