Good afternoon, I’m started on Arduino recently acquired an Arduino UNO, two DC motors and a 12v H bridge (L293D Dual H Bridge Motor Driver).
With only an ON and OFF I intended to accomplish the following functions:
When the switch is ON the motor should run for 10 seconds and then stop, then turn on an LED.
If the button should be OFF the LED off and the engine to run 10 seconds in the opposite direction and then stop.
I’ve tried some examples but still could not get a code that works correctly, asking for your help to solve this my little problem.