Arduino Uno with waterpump

That's exactly right. The RTC power can be 5 volts from anywhere, very low current even when it is fully on.

Take a look at this simulation:

showing how, and how easily, the RTC can be made the central controlling element of a system. There are all kinds of help for dealing with time and date, passage of time, comparisons and so forth. Many ppl benefit from simply deriving a "seconds since midnight" number and using that everywhere. If only machines are involved, HH:MM:SS gets old fast.

Install a DS1307 or these days a DS3231 library and look at the examples that should come with it.

I say "a library" rather than "the" library, as writing an RTC library seems like it must be some rite of passage... there are too many.

Perhaps someone will nominate the best or a favorite or one that def works.

a7

So much is possible with an RTC! So just to be clear, it is possible to choose with an app that I say for example that the motor runs every 2 days for 20 sec. But also if I would like every day. And for that I need an RTC to make that work properly? Sorry for so many questions, I'm new to this but would like to learn more!

No problem. But it does seem like you may have been living under a rock for some time. :wink:

Look around and see all the amazing things that are going on in all kindsa little devices, propelled and even made possible at all by microprocessors.

Browse in these fora for a few days and see what all people manage to make these little beasts do.

You say

...every 2 days for 20 sec. But also if I would like every day.

So without worrying about how to code this, decide how you want this to work.

How would you like to choose whether you want pattern 1 or pattern 2 or pattern X?

How will the patterns be specified? Written in the code? Or an elaborate scheme where you could change things up with a keypad and display screen?

Do you need a "run right now for 20 seconds" button?

How accurate do you need "days" to be, or "20 sec." for that matter? You do not need to use an RTC, but it makes things that otherwise might not be super-accurate. Including graceful recovery from a power outrage.

Srsly, this is the expand and explore phase. Just don't bite off too much. Aim for getting a simple "once a minute for 10 seconds light an LED" sketch working... waiting 2 days to find you've bungled something will make this get old real fast.

If you can do that, you will have come to grips with the RTC and how to get at what it can do for you.

As always, the cheap, easy and safe way is to do it first in the wokwi. Then worry about getting a real RTC and you real Arduino doing the same dance.

You can always get help here, but it is a well-worn path and you will find many tutorials and examples and projects ppl are proud of a google away.

a7

Maybe a rare question, but is it possible to have a private conversation with you a7? I think you know a lot here, and maybe you can help me a little further. And I don't mean that you have to write codes for me or anything, but privately I might be able to tell you a little more about what I want exactly and maybe you can help me make a start on how I'm going to do this in the right steps. No is also an answer, and that's okay too.

Haha, flattery will get you nowhere. :expressionless:

There is a huge advantage to continuing this on the thread here. The more ppl that see where you are at and where you are going and where you are stuck, the better. And there is a fair chance that the discussion will be valuable for others than you.

While a casual conversation like we were at the cafe might be hugely valuable, ultimately no matter you write this code or you have someone else write it for you, you will have to very clearly and completely and unambiguously specify the exact functions, hardware and user interface. With any project.

So take a stab. Don't worry about getting it just right, we here to complain and point out any deficiencies in your descriptions. And ask pointy questions… answers to which may be obvious to you, or questions that may have never occurred to you.

Unless you are talking about proprietary informations you are not at liberty to divulge. In that case, these fora are not the place, unless you do decide to engage at a private level for paid work w/ non-disclosure and so forth.

a7

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