I have connected DRV8835 with 2 DC motors with 11 power supply. Arduino nano.
When I for loop like i from 0 to 1024 for analogWrite(i,Motor1) for the DC Motor1 it's accelerating from 0 to 200 and it's stopping. When I becomes 250 it's starting at higher speed. When it becomes 500 it's stopping again. And 550 we have our power again.
Now I tried to run analogWrite(1000, ***) but it's not working. When I change the value from 1000 to 1005 it's not working again. But at 1024 we have the maximum speed and it is working?
#define LEFT_PWM 9
#define RIGHT_PWM 10
#define LEFT_DIR 5
#define RIGHT_DIR 6
void setup() {
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
}
void loop() {
digitalWrite(LEFT_DIR, HIGH);
analogWrite(LEFT_PWM, 1000);
}