how to programme arduino to move its servos at certain time,there is a ds1307RTC

Hi to all, Iam noob with this thing but just got my arduino and a couple of servos, I just want some help telling servos to move(it is a pan and tilt kit) at certain times of the day. I have ordered a ds1307 RTC(its on the way). thank you all in advance for your replies

There are 7 or 8 registers in the RTC that you can read with I2C (Wire.h) commands. In your void loop, read those once a second, minute, hour, whatever, and when you get a time that is >= than the time you want, do your action, and setup the time/day for the next movement time.

CrossRoads: There are 7 or 8 registers in the RTC that you can read with I2C (Wire.h) commands. In your void loop, read those once a second, minute, hour, whatever, and when you get a time that is >= than the time you want, do your action, and setup the time/day for the next movement time.

Thank you very much for replying to my message, can you give me an example because I need to see something to understand as Iam a total noob but I'd like to learn some things, thank you again

blades: Thank you very much for replying to my message, can you give me an example because I need to see something to understand as Iam a total noob but I'd like to learn some things, thank you again

There are plenty of examples that already come with the library for that particular component. Try playing with some of those.

I am using an RTClib library that has simple calculations of epoch time. It's very useful for you to have such feature to compare time, instead of looking at the real time (human readable is not always the best for machines).

https://github.com/adafruit/RTClib

Arrch:

blades: Thank you very much for replying to my message, can you give me an example because I need to see something to understand as Iam a total noob but I'd like to learn some things, thank you again

There are plenty of examples that already come with the library for that particular component. Try playing with some of those.

ok I will as soon as I get this RTC. Thanx again.

liudr:
I am using an RTClib library that has simple calculations of epoch time. It’s very useful for you to have such feature to compare time, instead of looking at the real time (human readable is not always the best for machines).

GitHub - adafruit/RTClib: A fork of Jeelab's fantastic RTC library

that’s a very good point to start!

Only no one ever learns anything by just grabbing a library all the time.
Here’s how I taught myself how to use I2C with a DS1307.

RTC_I2C_test__IDE_Serial.ino (8.07 KB)

Ironically it is a "time" issue for me. I'm finding myself learning stuff everyday already, since I started working on a major project. If I had time, I'd learn more about JavaScript, more OOP, linux, raspberry pi etc. possibly in that order. I thought about learning the RTC by writing bare code at one point in time but it's just not very high up on my list anymore.

CrossRoads: Only no one ever learns anything by just grabbing a library all the time. Here's how I taught myself how to use I2C with a DS1307.

Well yes you are right but at this time I don't have much time to learn the DS1307 thing. I guess it's one way, I have to learn something. Thank you again for reminding

Hello, ds1307RTC is here, I soldered all things together but one problem, I can't find a diagram how to connect it to breadboard or to Arduino Uno rev3. If anybody has a diagram post it please as to go to the library next. thank you I have this RTC http://adafruit.com/products/264

You need to look a little harder at the Adafruit site. They have great tutorials.

Try this one: http://learn.adafruit.com/ds1307-real-time-clock-breakout-board-kit/overview

jlizotte: You need to look a little harder at the Adafruit site. They have great tutorials.

Try this one: http://learn.adafruit.com/ds1307-real-time-clock-breakout-board-kit/overview

YES! I found it an hour ago and folowed up its instructions, thank you very much.