I wont code for this - Dc motor cw for 3 second.. delay 1 second ..ccw for 3 second delay ..1 second continue cycle using 2 delay switch and Arduino Uno .
What motor, what motor driver, what Arduino, what power supply?
Please read and follow the directions in the How to use this forum post.
The solution is simple use a H bridge driver. The delay function on the arduino will do the job for you, you need to determine the output pins etc when you define the H bridge and hook it up to the CW/CCW motor and of course you will pick the correct voltage and current capability!This response is to help you get started in solving your problem, not solve it for you.
Good Luck & Have Fun!
Gil
What is a 2 delay switch?