mirror of
https://github.com/okalachev/flix.git
synced 2025-07-27 01:29:33 +00:00
Increase motors pwm frequency to 78Khz
1000 Hz is too low frequency considering the update loop for motors signal is also 1000 Hz. Decrease resolution as it's required to set larger pwm frequencies. This change should vastly improve control jitter and remove audible motors noise.
This commit is contained in:
parent
48c7135efb
commit
121b50d896
@ -11,8 +11,8 @@
|
||||
#define MOTOR_2_PIN 14 // front right
|
||||
#define MOTOR_3_PIN 15 // front left
|
||||
|
||||
#define PWM_FREQUENCY 1000
|
||||
#define PWM_RESOLUTION 12
|
||||
#define PWM_FREQUENCY 78000
|
||||
#define PWM_RESOLUTION 10
|
||||
#define PWM_STOP 0
|
||||
#define PWM_MIN 0
|
||||
#define PWM_MAX 1000000 / PWM_FREQUENCY
|
||||
|
Loading…
x
Reference in New Issue
Block a user