Open jr1221 opened 1 month ago
Implement PWM control servos. This should include a wrapper API and a higher level get_angle, set_angle, etc. It should have an init function to configure GPIOs if needed.
https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/peripherals/mcpwm.html
https://github.com/espressif/esp-idf/blob/master/examples/peripherals/mcpwm/mcpwm_servo_control/main/mcpwm_servo_control_example_main.c
Investigate a two layer system, where you have control.c pass in a struct pointer of servo_t to do get_angle, set_angle whatever in servo.c
control.c
servo_t
servo.c
Implement PWM control servos. This should include a wrapper API and a higher level get_angle, set_angle, etc. It should have an init function to configure GPIOs if needed.
https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/peripherals/mcpwm.html
https://github.com/espressif/esp-idf/blob/master/examples/peripherals/mcpwm/mcpwm_servo_control/main/mcpwm_servo_control_example_main.c