|
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 is enabled only during the setAngle() execution for a period of 1 second, and then turned back off. If 0, PWM remains on afterward. |
mraa_result_t setAngle |
( |
int |
angle | ) |
|
Sets the angle of the servo engine.
- Parameters
-
angle | Number between 0 and 180 |
- Returns
- 0 if successful, non-zero otherwise
mraa_result_t haltPwm |
( |
| ) |
|
Halts PWM for this servo and allows it to move freely.
Returns the name of the component
- Returns
- Name of the component
void setMinPulseWidth |
( |
int |
width | ) |
|
Sets the minimum pulse width
- Parameters
-
width | Minimum HIGH signal width |
void setMaxPulseWidth |
( |
int |
width | ) |
|
Sets the maximum pulse width
- Parameters
-
width | Maximum HIGH signal width |
void setPeriod |
( |
int |
period | ) |
|
Sets the maximum period width
- Parameters
-
Returns the minimum pulse width
- Returns
- Minimum pulse width
Returns the maximum pulse width
- Returns
- Maximum pulse width
Returns the maximum PWM period width
- Returns
- Maximum PWM period width
The documentation for this class was generated from the following files: