How can i make a schedule for the Arduino motor operation

I'd like to make a schedule for the Arduino motor operation.

For example, Now is at pm 2. And I want to make a code so that the motor can operate at 4:30 PM, what should I do?

I am sorry that I am not good at English.

Do you want absolute time? If so, add an RTC to your project.

If you want a 'delay' afterstarting the Arduino, use delay() or a millis() based approach.

There are two components

  1. a real time clock device so you can read the current time and switch on the motor when required
  2. motor control - what type of motor were you considering?

I think there will be difficulties in delay or millies because we have to operate the DC motor according to the sunrise/sunset time. There was a lack of explanation for my project. I'm sorry.

Thank you very much for your reply :slight_smile:

I'm going to use the DC motor!
To explain the exact project, I want to operate the motor at sunrise/sunset time.
Thank you very much for your reply :slight_smile:

An RTC and a table in the code to know when sunset/sunrise is.

maybe you just need a light sensor. turn the motor on when the light level exceeds and then later drops below some threshold

Hi,
What is the motor controlling that needs to be moved at sunrise and sunset?

Could you use a simple light sensor to detect the changes in light at sunrise and sunset?
That way you have no dependence on a time piece and you will be synchronized with the SUN, 24/7.

Thanks.. Tom.... :smiley: :+1: :coffee: :australia:

Is this project for chickens? Cluck, cluck!
Please tell us more.

Good luck.......

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.