Hello, I have probably a stupid question but today my brain it's weird!!! I have L298N Motor Driver shield on an Arduino Mega. Everything works but I need to make the code more simple. How I can shrink all these commands in one command to make my robot go forward?:
analogWrite (speedPinB, 255); analogWrite (speedPinA, 255); digitalWrite (dir1PinA, LOW); digitalWrite (dir2PinA, HIGH); digitalWrite (dir1PinB, LOW); digitalWrite (dir2PinB, HIGH);
Forward = "all the code above"