Controlling a motor with arduino

Yes using delays would work. But using millis() in the long run (both project and learning) is better. Better to learn do to something the better way than have to reteach yourself later.

From best to worst:

  1. Use an RTC
  2. Use millis()
  3. Use delay

My most frank opinion on how to learn and proceed with this project would be to learn and use millis() first with a "short day" (5 minutes or so). That will get the program layout started and get your motor to run forward and reverse. Then Save As... to version to and incorporate an RTC to determine the 24 hour mark (still use millis for the seconds delays). Adafruit offers a RTC (DS3231) (Adafruit DS3231 Precision RTC Breakout : ID 3013 : $17.50 : Adafruit Industries, Unique & fun DIY electronics and kits). I have found they have fairly thorough examples and explanations on how to use the modules.