Hi! Am I right that the code below would short an H-bridge?
when this code loops motor2A and motor2B will be HIGH at the same time.
I see most autonomous cars code is something like this, Is it because turning on both arduino pins to hbridge at the same time is too quick to matter?
what can I add to the code to prevent this?
this is for autonomous car
void loop() {
//Forward
//motor1 is Left side
//motor2 is Right side
digitalWrite(motor1A, HIGH);
digitalWrite(motor1B, LOW);
digitalWrite(motor2A, HIGH;
digitalWrite(motor2B, LOW);
delay(2000);
//Reverse
digitalWrite(motor1A, LOW);
digitalWrite(motor1B, HIGH);
digitalWrite(motor2A, LOW);
digitalWrite(motor2B, HIGH);
delay(2000);
}