#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "driver/mcpwm.h"
#include "soc/mcpwm_periph.h"
#include "esp_attr.h"
#include "sdkconfig.h"
#include "esp_log.h"
#include "esp_err.h"
#include "pin_defs.h"
Go to the source code of this file.
◆ enable_servo()
esp_err_t enable_servo |
( |
| ) |
|
Enables Servo port on the sra board, sets up PWM for the three pins in servo port.
- Returns
- esp_err_t - returns ESP_OK if servo pins initialised, else it returns ESP_ERR_INVALID_ARG
◆ read_servo()
Get the angle of the servos.
- Returns
- esp_err_t
◆ set_angle_servo()
esp_err_t set_angle_servo |
( |
servo_config * |
config, |
|
|
unsigned int |
degree_of_rotation |
|
) |
| |
Set the angle of the servos attached to the servo port of SRA Board.
- Parameters
-
config | pointer to the servo_config struct |
degree_of_rotation | angle to which the servo must be set, depends on value of MAX_DEGREE macro |
- Returns
- esp_err_t