Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Servo_PWM Class Reference
Class to control a servo by using PWM. More...
#include <Servo_PWM.h>
Public Member Functions | |
| Servo_PWM (PinName Pin, int frequency) | |
| Create a new Servo object on any PWM pin. | |
| void | SetPosition (int position) |
| Change the position of the servo. | |
| void | operator= (int position) |
| Operator for confortable positioning. | |
| void | initialize () |
| initialize ESC | |
Detailed Description
Class to control a servo by using PWM.
Definition at line 11 of file Servo_PWM.h.
Constructor & Destructor Documentation
| Servo_PWM | ( | PinName | Pin, |
| int | frequency | ||
| ) |
Create a new Servo object on any PWM pin.
- Parameters:
-
Pin Pin on mbed to connect servo to
Definition at line 4 of file Servo_PWM.cpp.
Member Function Documentation
| void initialize | ( | ) |
initialize ESC
Definition at line 14 of file Servo_PWM.cpp.
| void operator= | ( | int | position ) |
Operator for confortable positioning.
- Parameters:
-
position see SetPosition
Definition at line 23 of file Servo_PWM.cpp.
| void SetPosition | ( | int | position ) |
Change the position of the servo.
Position in us
- Parameters:
-
position The new value of the servos position between 0 and 1000 (gets 1000-2000) (us)
Definition at line 19 of file Servo_PWM.cpp.
Generated on Tue Jul 12 2022 20:54:02 by
1.7.2