much like blinking an led but turning on two at the same time. could anyone possibly give me an idea of how to achieve this.
for example i want to turn on motors on pin 0 and 2 on at the same time for 4 seconds,would this be correct?
would this be how i would type in the code if i wanted motor on pin 0 to go for 4 seconds?
how do i turn on pin 2 at the same time as well!?
int leftmotor = 0;int rightmotor = 2;int backmotor = 4;int leftmotor = LOW;int rightmotor = LOW;int backmotor = LOW;
if (leftmotor== LOW) leftmotor= HIGH; else ledState = LOW;
digitalWrite(0, ledState); digitalWrite(2, ledState);
if (backState == LOW) backState = HIGH; else backState = LOW;
backState = !backState;