Instantiates a Servo object
- Parameters
-
Servo |
( |
int |
pin, |
|
|
int |
minPulseWidth, |
|
|
int |
maxPulseWidth |
|
) |
| |
Instantiates a Servo object
- Parameters
-
pin | Servo pin number |
minPulseWidth | Minimum pulse width, in microseconds |
maxPulseWidth | Maximum pulse width, in microseconds |
Servo |
( |
int |
pin, |
|
|
int |
minPulseWidth, |
|
|
int |
maxPulseWidth, |
|
|
int |
waitAndDisablePwm |
|
) |
| |
Instantiates a Servo object
- Parameters
-
pin | Servo pin number |
minPulseWidth | Minimum pulse width, in microseconds |
maxPulseWidth | Maximum pulse width, in microseconds |
waitAndDisablePwm | If 1, PWM is enabled only during the setAngle() execution for a period of 1 second, and then turned back off. If 0, PWM remains on afterward. |
Returns the maximum pulse width
- Returns
- Maximum pulse width
Returns the minimum pulse width
- Returns
- Minimum pulse width
Returns the maximum PWM period width
- Returns
- Maximum PWM period width
Halts PWM for this servo and allows it to move freely.
Returns the name of the component
- Returns
- Name of the component
int setAngle |
( |
int |
angle | ) |
|
Sets the angle of the servo engine.
- Parameters
-
angle | Number between 0 and 180 |
- Returns
- 0 if successful, non-zero otherwise
void setMaxPulseWidth |
( |
int |
width | ) |
|
Sets the maximum pulse width
- Parameters
-
width | Maximum HIGH signal width |
void setMinPulseWidth |
( |
int |
width | ) |
|
Sets the minimum pulse width
- Parameters
-
width | Minimum HIGH signal width |
void setPeriod |
( |
int |
period | ) |
|
Sets the maximum period width
- Parameters
-
The documentation for this class was generated from the following file:
- /var/lib/jenkins/workspace/upm-doc-stable/build-33/src/servo/Servo.java