timed on reversable motor

i want to push button motor runs forward for 90 sec. push button again motor runs in reverse for 90 sec.
two weeks with my starter kit and google each night and i have not been able to do this . the more i read i believe Arduino can do this but i haven't found an example or suggestion how yet.any suggestions or paths to follow would be appreciated.I;m using a small relay board 5volts channel relay

mbyers:
i want to push button motor runs forward for 90 sec. push button again motor runs in reverse for 90 sec.
two weeks with my starter kit and google each night and i have not been able to do this . the more i read i believe Arduino can do this but i haven't found an example or suggestion how yet.any suggestions or paths to follow would be appreciated.I;m using a small relay board 5volts channel relay

Welcome to the Arduino forum. We attempt to help those people who have become stuck in problems.

In order to begin to understand what you have and how you are using it, please describe the motor, the relay and then draw a wiring diagram of your electrical connections and take a picture of the drawing and include it with you post.

How are you powering the project? Hopefully not with your Arduino.

In order to do what you want you need two relays. Perhaps a DPDT to switch current directions and a SPST relay to turn the motor on and off. What do you have?

Paul

Do you need it that if the second press is within the first 90s:

  • the motor will reverse immediately, or
  • the second (early) press of the button must be ignored, or
  • the second (early) press must be "stored" pending the first 90s finishing so the motor reverses as soon as the first 90s is complete?

You will in any case want to look at the state change detect tutorial to see how to "catch" a new press of a button.