|
C++ DevKit
C++ set of OOP library
|
the class that manages the SG90 step motor More...
#include <sg90.h>

Public Member Functions | |
| SG90 (struct_ConfigSG90 sg90_config) | |
| Construct a new SG90 object. | |
| void | set_pos (int pos) |
| the command to set the position of the motor. | |
Private Attributes | |
| PWM * | pwm |
| the PWM slice that handle the SG90 step motor device | |
| uint | command |
| the gpio pin used to command the servo motor. Correspond to the B channel of the PWM slice | |
| uint | sync |
| n auxilliary pulse that can be used as a synchro signal. Correspond to the A channel of the PWM slice | |
| int | pos_min_deg |
| minimum position in degrees. Typically 0° or -90°. | |
| int | pos_max_deg |
| maximum position in degrees. Typically 180° or +90°. | |
| float | coef_us_per_degree |
| the coversion coefficient in microseconds per degree | |
the class that manages the SG90 step motor
| SG90::SG90 | ( | struct_ConfigSG90 | sg90_config | ) |
Construct a new SG90 object.
| sg90_config |
| void SG90::set_pos | ( | int | pos | ) |
the command to set the position of the motor.
| pos | position in degrees, between pos_min_deg and pos_max_deg. |