There is another thing that you should obey:
always post your complete sketch.
Your drive backwards function
with this code-snippet it stays unclear what io-pin-numbers did you assign
en1 and en3
additional: why do you use en3 instead of en2?
this does not really say which IO-pins you use
these are all reasons why you should really
always post your complete sketch.
just a few mouse-clicks
You can insert your complete sketch as a code-section
which looks lke this
int Backward()
{
digitalWrite(in1,HIGH);
analogWrite(en1, 65); <----- not rotating..
digitalWrite(in2,LOW);
digitalWrite(in3,HIGH);
analogWrite(en3, 65);
digitalWrite(in4,LOW);
}
int Forward()
{
digitalWrite(in1,LOW);
digitalWrite(in2,HIGH);
analogWrite(en2, 65);
digitalWrite(in3,LOW);
digitalWrite(in4,HIGH);
analogWrite(en4, 65);
}
by following this tutorial