Hi everyone
I am making a line follower but having a issue while providing same pwm to both l293d ic the output of ic is different for both the motors and bot move in a direction en1 and en2 are provided with same pwm signal. The voltage is different when measure between (out1 , out2) and (out3 , out4) and it also changes when measure next time my multimeter is all good and the connection is solid
#define left_1 9
#define left_2 8
#define left_pwm 10
#define right_1 13
#define right_2 12
#define right_pwm 11
int left__pwm = 128, right__pwm = 128;
char rd;
void setup() {
// put your setup code here, to run once:
pinMode(left_1, OUTPUT);
pinMode(left_2, OUTPUT);
pinMode(left_pwm, OUTPUT);
pinMode(right_1, OUTPUT);
pinMode(right_2, OUTPUT);
pinMode(right_pwm, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(left_1, HIGH);
digitalWrite(left_2, LOW);
analogWrite(left_pwm, left__pwm);
digitalWrite(right_1, HIGH);
digitalWrite(right_2, LOW);
analogWrite(right_pwm, right__pwm);
Serial.print("left_pwm=");
Serial.print(left__pwm);
Serial.print("\t");
Serial.print("right_pwm=");
Serial.print(right__pwm);
Serial.print("\t");
Serial.print("\n");
}