I have included PWM library in BLE uart example to control the servo motor. I am able to import the library successfully and able to control the servo. Below is my init_pwm function
Total period for a PWM to control a servo motor should be 20ms. This is have set in the init_pwm function above. Now the problem is to control the angle of the motor the Pulse width should be from 1ms to 2 ms max which converts to duty cycle 5% to 10% and the function app_pwm_channel_duty_set get input in uint16_t. So I only have the option to set the duty cycle to 5,6,7,8,9 & 10. Each value corresponds to 36 degree movement for servo motor. This is no where near to Precise angle controlling of servo motor. I have tested different values in this function and figured out that it works with value from 3 to 13.
Is there any way I can control the angle of the motor precisely in 1 degree step size?
Hardware information: Custom board with NRF52832.