Is there a way to set a time for instance 8.00 PM to make the arduino-uno start or stop at that time?

  • 1
    Power it through one of these: dealec.co.uk/acatalog/… – Majenko May 11 '15 at 11:16
  • What are you trying to accomplish? Why do you need it stopped? Is it to save power or to quit doing its function? The suggestions would be different in each case. – JRobert May 11 '15 at 11:39
  • @Majenko: mechanical? Really? :-) – Joris Groosman May 11 '15 at 11:39

Really stop Arduino is possible, it's called sleep mode, but the UNO is designed so badly with respect to power consumption that you may as well keep it running.

To have it done something at a specific time you could connect a real time clock (RTC) breakout board (SparkFun has a couple). Use a 1 second timer interrupt to read the clock and compare it with (a table of) times where you want things done. A table could hold the time, an output (e.g. for a relay) and the new status (on or off). If you have just a couple of those you can store them in the RTC's battery-backed up RAM.

You can use your PC's time, all the hardware you need is the USB cable. On the PC you run a program that sends the current time to the Arduino. (There are Processing examples of how to communicate with the Arduino on the Net.)

Note that without an RTC your PC will have to be on all the time and connected to the Arduino. You could use the PC just to sync the Arduino's clock and keep time yourself, but the clock of the Arduino is not very accurate.

Getting the time from the Internet is also possible, but then you'll need a Wifi or Ethernet shield to make the connection.

| improve this answer | |
  • thanks for the answer, but I want to use the time of my pc or internet. Is it still possible? – Xavier de Aguirre May 11 '15 at 11:52
  • See the edit of my answer. – Joris Groosman May 11 '15 at 12:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.