hi everyone
i have 2 6 volt dc motors and l298 and 7.5 volts with 5 AA 1.5 volts battery
when im using one of the motors with full speed each motor work
but when im using both of them together i see 2 problems :
first : the speed of each motor is lower than speed of working one motor
second : one of wheels is not working unless i touch and move it manually for starting and then it will work and i test it and switch motors connection and i find out one of motor connector in l298n is having the problem i thought maybe its my l298n has problem but if my connector has problem why is it working
with one motor and not 2 motor together ????????
this is my code for testing :
int ena_right = 3;
int first_pin_right = 4;
int first_pin_left =5 ;
int ena_left = 6;
int sec_pin_right = 7;
int sec_pin_left =8;
void setup()
{
for (int i = 3 ; i < 9 ; i++)
{
pinMode(i,OUTPUT);
}
digitalWrite(first_pin_right,HIGH);
digitalWrite(first_pin_left,LOW);
digitalWrite(sec_pin_right,HIGH);
digitalWrite(sec_pin_left,LOW);
delay(2000);
analogWrite(ena_right,255);
delay(2000);
analogWrite(ena_right,0);
delay(500);
analogWrite(ena_left,255);
delay(2000);
analogWrite(ena_left,0);
delay(500);
analogWrite(ena_left,255);
analogWrite(ena_right,255);
delay(2000);
analogWrite(ena_right,0);
analogWrite(ena_left,0);
}
void loop()
{
}