Go to the source code of this file.
|
#define | ES9257_MIN_PULSE_WIDTH 475 |
|
#define | ES9257_MAX_PULSE_WIDTH 2100 |
|
#define | ES9257_PERIOD 20000 |
|
#define | ES9257_MAX_ANGLE 180.0 |
|
◆ es9257_init()
es9257_context es9257_init |
( |
int32_t |
pin, |
|
|
int32_t |
min_pulse_width, |
|
|
int32_t |
max_pulse_width |
|
) |
| |
Instantiates a the servo at the given pin
- Parameters
-
pin | Servo pin number |
minPulseWidth | Minimum pulse width, in microseconds |
maxPulseWidth | Maximum pulse width, in microseconds |
◆ es9257_halt()
Halts PWM for this servo and allows it to move freely.
◆ es9257_set_angle()
Sets the angle of the servo engine.
- Parameters
-
angle | Number between 0 and 180 |
- Returns
- 0 if successful, non-zero otherwise
◆ es9257_set_min_pulse_width()
Sets the minimum pulse width
- Parameters
-
width | Minimum HIGH signal width |
◆ es9257_set_max_pulse_width()
Sets the maximum pulse width
- Parameters
-
width | Maximum HIGH signal width |
◆ es9257_get_min_pulse_width()
Returns the minimum pulse width
- Returns
- Minimum pulse width
◆ es9257_get_max_pulse_width()
Returns the maximum pulse width
- Returns
- Maximum pulse width