Hi guys, I have an Arduino Uno and an adafruit motor shield... i want to be able to control the two motors at the same time...i have a code below that doesnt work, if you guys have a better structure or code please point it out.thnks
well look at the code (best would be to post it within the code brackets BTW)
Conceptually you continually do this:
you start "motor" forward at speed 255
you wait 1 second
you stop motor (release removes power from the motor)
you start "motor1" forward at speed 255
you wait 1 second
you stop motor1
what you probably want to do is
you start "motor" forward at speed 255
you start "motor1" forward at speed 255
you wait 1 second
you stop motor
you stop motor1
that is still poor because the loop will kick in again and right after stopping the motor you will start them again for 1 second...
if you do this, the motors will be on and off for 1 second at at time.
you start "motor" forward at speed 255
you start "motor1" forward at speed 255
you wait 1 second
you stop motor
you stop motor1
you wait 1 second
ideally you would need a button and when you press on the button you stop the motors or something