Servo Class
Item Index
Methods
Servo
                      
                              - 
                                              pin
Instantiates a Servo object
Parameters:
- 
                                              pinNumberServo pin number 
Returns:
Servo
                      
                              - 
                                              pin
- 
                                              minPulseWidth
- 
                                              maxPulseWidth
Instantiates a Servo object
Parameters:
- 
                                              pinNumberServo pin number 
- 
                                              minPulseWidthNumberMinimum pulse width, in microseconds 
- 
                                              maxPulseWidthNumberMaximum pulse width, in microseconds 
Returns:
Servo
                      
                              - 
                                              pin
- 
                                              minPulseWidth
- 
                                              maxPulseWidth
- 
                                              waitAndDisablePwm
Instantiates a Servo object
Parameters:
- 
                                              pinNumberServo pin number 
- 
                                              minPulseWidthNumberMinimum pulse width, in microseconds 
- 
                                              maxPulseWidthNumberMaximum pulse width, in microseconds 
- 
                                              waitAndDisablePwmNumberIf 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:
setAngle
                      
                              - 
                                              angle
Sets the angle of the servo engine.
Parameters:
- 
                                              angleNumberNumber between 0 and 180 
Returns:
0 if successful, non-zero otherwise
haltPwm
                      
                              ()
                      
                              
                                  Mraa_result_t
                              
                      
                      
                      
                      
                      
                      
                      
                          
                      
                          Halts PWM for this servo and allows it to move freely.
Returns:
name
                      
                              ()
                      
                              
                                  String
                              
                      
                      
                      
                      
                      
                      
                      
                          
                      
                          Returns the name of the component
Returns:
Name of the component
setMinPulseWidth
                      
                              - 
                                              width
Sets the minimum pulse width
Parameters:
- 
                                              widthNumberMinimum HIGH signal width 
setMaxPulseWidth
                      
                              - 
                                              width
Sets the maximum pulse width
Parameters:
- 
                                              widthNumberMaximum HIGH signal width 
setPeriod
                      
                              - 
                                              period
Sets the maximum period width
Parameters:
- 
                                              periodNumberPWM period width 
getMinPulseWidth
                      
                              ()
                      
                              
                                  Number
                              
                      
                      
                      
                      
                      
                      
                      
                          
                      
                          Returns the minimum pulse width
Returns:
Minimum pulse width
getMaxPulseWidth
                      
                              ()
                      
                              
                                  Number
                              
                      
                      
                      
                      
                      
                      
                      
                          
                      
                          Returns the maximum pulse width
Returns:
Maximum pulse width
getPeriod
                      
                              ()
                      
                              
                                  Number
                              
                      
                      
                      
                      
                      
                      
                      
                          
                      
                          Returns the maximum PWM period width
Returns:
Maximum PWM period width