|
int | calcPulseTraveling (int value) |
|
|
std::string | m_name |
|
int | m_servoPin |
|
float | m_maxAngle |
|
mraa_pwm_context | m_pwmServoContext |
|
int | m_currAngle |
|
int | m_minPulseWidth |
|
int | m_maxPulseWidth |
|
int | m_period |
|
int | m_waitAndDisablePwm |
|
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 will be enabled only during setAngle() execution for a period of 1 second, and then turned back off. If 0, PWM will remain on afterward. |
mraa_result_t setAngle |
( |
int |
angle | ) |
|
Set the angle of the servo engine.
- Parameters
-
angle | number between 0 and 180 |
- Returns
- 0 on success; non-zero otherwise
mraa_result_t haltPwm |
( |
| ) |
|
Halts PWM for this servo and allows it to move freely.
Return name of the component
- Returns
- name of the component
void setMinPulseWidth |
( |
int |
width | ) |
|
Set minimum pulse width
- Parameters
-
width | minimum HIGH signal width |
void setMaxPulseWidth |
( |
int |
width | ) |
|
Set maximum pulse width
- Parameters
-
width | maximum HIGH signal width |
void setPeriod |
( |
int |
period | ) |
|
Set maximum period width
- Parameters
-
Return minimum pulse width
- Returns
- minimum pulse width
Return maximum pulse width
- Returns
- maximum pulse width
Return maximum PWM period width
- Returns
- maximum PWM period width
The documentation for this class was generated from the following files:
- /var/lib/jenkins/workspace/upm-doc-stable/src/servo/servo.h
- /var/lib/jenkins/workspace/upm-doc-stable/src/servo/servo.cxx