Closed anshchawla521 closed 1 year ago
to solve the above issue we can either increase the frequency of pwm signal to 490 hz as ESC dont care about frequency and only the width of pulse so max theoretical frequency for 2ms width signal would be 500 hz but actual max would be less than that so that the ESC can differentiate between pulses.
OR we can switch to ONESHOT125 with max frequency of 4000hz(theoretical) and operate it on 2khz(PID loop frequency)
Fixed in Commit 5ac0893 by adding oneshot125 although in crude but safe manner that what make the motors stop if the code crashes
PID frequency -2000hz Motors - 50 hz Servo command call frequency -2000hz