mirror of
https://github.com/okalachev/flix.git
synced 2025-07-28 20:08:53 +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
443e5213f0
commit
cf3d4d7ced
@ -10,8 +10,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
|
||||
|
||||
// Motors array indexes:
|
||||
const int MOTOR_REAR_LEFT = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user