|
STM32 core 3.0.1-dev
Arduino core for STM32 based boards: API reference
|
← STM32duino documentation
|
Interrupt driven Servo library using 16 bit timers - Version 2. More...
#include "api/Common.h"#include <inttypes.h>#include "stm32/ServoTimers.h"Classes | |
| struct | ServoPin_t |
| Pin of a servo channel. More... | |
| struct | servo_t |
| Servo channel data. More... | |
| class | Servo |
| Servo motor controller. More... | |
Macros | |
| #define | Servo_VERSION 2 |
| Software version of this library. | |
| #define | MIN_PULSE_WIDTH 544 |
| Shortest pulse sent to a servo, in microseconds. | |
| #define | MAX_PULSE_WIDTH 2400 |
| Longest pulse sent to a servo, in microseconds. | |
| #define | DEFAULT_PULSE_WIDTH 1500 |
| Default pulse width when a servo is attached, in microseconds. | |
| #define | REFRESH_INTERVAL 20000 |
| Minimum time to refresh servos, in microseconds. | |
| #define | SERVOS_PER_TIMER 12 |
| Maximum number of servos controlled by one timer. | |
| #define | MAX_SERVOS (_Nbr_16timers * SERVOS_PER_TIMER) |
| Maximum number of servos supported by the available 16 bit timers. | |
| #define | INVALID_SERVO 255 |
| Flag indicating an invalid servo index. | |
Interrupt driven Servo library using 16 bit timers - Version 2.
A servo is activated by creating an instance of the Servo class passing the desired pin to the attach() method. The servos are pulsed in the background using the value most recently written using the write() method.
The methods are: