is there any programs that simply work without add ons to run 4 sensor

is there any programs that simply work without loads of add ons to run 4 sensor? Arduino seems to only like to run one relay and one sensor and after just buying six of them for my projects in the garden am mad ....I want a simple no frills watering plants and turning on fans scetch that dont need clock"as it seems there is not one in a controller chip and you need more add ons" no thanks the programmer chip should be able to run time.h that as been removed rendering half the programes out there hopless like garduino and the others that used time.h Can anyone please help as have got cancer and i can not always get to my allotment every day and my toms pepper ect are dying

Hi, sorry to hear about your health issues. But knowing about them does not help us understand you. Please try to write in sentences and watch out for your phone/tablet changing words to something you did not intend to write (my phone does that all the time, drives me crazy).

What do you mean by "add ons"? Hardware or software?

Arduino is more than capable of running multiple sensors and relays. What makes you say it can only run one of each?

What you said about time.h I cannot fathom at all.

Please try again to explain what you are trying to achieve and the problems you perceive. Marshal your thoughts before you touch the keyboard/screen.

Paul

time.h that as been remove

Removed form where?

I am assuming you have read Arduino Playground - Time

It tells you where to get the new time libiary.

The problem with using the Arduino to keep the time is that it drifts because the oscillator is not that accurate which is why real time clock chips are popular. Also every time the power is removed and then reapplied you have to set the time again, the clock chips do not have this problem as there is a battery backup keeping the chip going when powered down.

This is not Arduino specific it applies to all micro controllers. The alternative is to use the internet to automatically set the time when you power up.

Your post is incoherent, and it is hard to see what your real problem is, but I think the answer is yes to both. and the real problem is attitude and programming ability. You can run as many relays as you have vacant pins, and that means surely more than four, and it takes virtually no more programming to do so than you apparently already have.

You are being a bit fast and loose about add-ons, and watering a garden without an RTC is really quite silly. A DS3231 costs about $2-50, and all is explained in reply#2.

I cannot see why using time.h should be a problem and, indeed, adding Time Alarms.h might be a good idea but, if I understand what you are doing, you should be able to to do it without any libraries at all - if you want to. I have never used time.h or any other RTC library, ever.

http://bildr.org/2011/03/ds1307-arduino/

Possibly a better approach to your requirements would be to collaborate on your project.
You’ll learn, and also end up with your first complete working system.

i don’t think your ‘attitude’ is wrong, but understand with the personal oressures you’re facing - you may need to adjust your expectations and ‘approach’ to them.

To an experienced developer, the Arduino side of your project is literally a weekend project. When it’s all running, add an RTC later if you decide you need it... e.g. you could restart your daily watering schedule from sunrise each day... no need for long term time stability at all!

Developing systems requires a sequence of things to happen...

-> Requirements
—- functionality and interoperation
-> Specification
—- program flow/ logic
—- block diagram followed by schematic
-> Assemble your Hardware platform
-> Software development
Prototype -> Review & Rework

Documentation starts on day one, and ends about a week after the finished productis complete!

Most hobbyists don’t realise they’re processing all these steps, either because the project is too small, or it’s become habituated in their work.

ADD: The body of this post has been copied to Introductory Tutorials

lastchancename:
.. e.g. you could restart your daily watering schedule from sunrise each day... no need for long term time stability at all!

Now that is seriously good thinking. I even see an automatic adjustment to season of year, length of day, and daylight saving in there.

I think you actually end to water plants when the sun goes down, not up.

Oh dear... Grumpy_Mike...
One could detect sunset just as easily as sunrise.
And/or X hours after sunrise, if sunset isn’t good enough.

lastchancename:
Oh dear... Grumpy_Mike...
One could detect sunset just as easily as sunrise.
And/or X hours after sunrise, if sunset isn’t good enough.

Don’t you think I know that?
Look at my post count!

I was just pointing out that you do want to water plants in the sunshine.

It just struck me as an odd thing to post!

EDIT: Ooohhh, I see.
My suggestion was assuming the timing always started at sunrise - then whether or not the sunset is 'detected, or time-out is moot.
I can see where we both missed the clarity!

So you thought that after nearly fifty years programming micro controllers I knew how to detect a sun rise but was totally mystified at how to detect a sun set?

Simmer down, children..... simmer down. You see enough irrigated commercial crops being watered in the day to conclude that this is hardly a big deal anyway, and both sunrise and sunset may be the answer - which was my point about length of day in the first place..

Sorry Uncle Nick

Grumpy_Mike:
So you thought that after nearly fifty years programming micro controllers I knew how to detect a sun rise but was totally mystified at how to detect a sun set?

That just made my day! Thanks!!!

I also think sunset is better. The water has more time to soak into the soil and be absorbed by the plants overnight. If done at sunrise, much more of the water will be evaporated by the heat of the day.

PaulRB:
I also think sunset is better...

That's kind of moot - the goal of our argument was HOW to determine the recurrent daily timing without drifting over time, or using an RTC.
Sensing sunrise or sunset are both OK, assuming the millis() clock is 'accurate enough' for 24 hours, then it gets 'restarted' for the next ~24 hour period.
When the water is turned on or off is a software decision, not dependent on sunrise or sunset.

Liquid1:
is there any programs that simply work without loads of add ons to run 4 sensor? Arduino seems to only like to run one relay and one sensor and after just buying six of them for my projects in the garden am mad

You seem to have a problem but do not completely describe it. From what I understand, you can control one relay but not multiple which sounds like an electrical problem (if you don't have coding mistakes). An Arduino can usually read multiple sensors without problems and definitely control multiple relays.

Can you post your code please and make a drawing how everything is wired (including power supplies); a photo of a hand-drawn diagram is fine.

Can you also please post links to the components that you're using (sensors, relays / relay boards, other).

lastchancename:
HOW to determine the recurrent daily timing

Use an ldr. But also use millis to prevent accidental re-triggering ,within a 23hr timeout, due to clouds, tree branches etc. around either dawn or dusk.