|
SunSPOT API V3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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 toMethod Detail |
---|
public void setValue(int val)
setValue
in interface IServo
val
- pulse width in microsecondspublic int getValue()
getValue
in interface IServo
public void setPosition(float position)
setPosition
in interface IServo
position
- percentage value to set the servo topublic void setBounds(int low, int high)
setPosition
method.
setBounds
in interface IServo
low
- pulse width value in microsecondshigh
- pulse width value in microsecondspublic IServoController getController()
getController
in interface IServo
|
SunSPOT API V3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |