pinMode(2, OUTPUT); //Left motors forward
pinMode(3, OUTPUT); //Left motors reverse
pinMode(4, OUTPUT); //Right motors forward
pinMode(5, OUTPUT); //Right motors reverse
It would be better to give your pins variable names
byte LeftFwdPin = 2;
byte LeftRevPin = 3;
byte RightFwdPin = 4;
byte RightRevPin = 5;
pinMode(LeftFwdPin, OUTPUT); //Left motors forward
pinMode(LeftRevPin, OUTPUT); //Left motors reverse
pinMode(RightFwdPin, OUTPUT); //Right motors forward
pinMode(RightRevPin, OUTPUT); //Right motors reverse
Tom...
![]()