1

Right now I have DHT11, PIR sensor, relay, and a photocell on the same board. I am planning to upload the data to a web server. But I want both DHT11 and photocell to be uploaded hourly; PIR and relay by every 3s. Is it possible for a single Arduino to perform such thing?

asked Mar 21, 2016 at 23:58

1 Answer 1

2

Yes. Perfectly possible.

How accurate do you need the "hourly"? If you want any form of accuracy at all you will really want to use an RTC module to provide the real time.

Otherwise that, and the higher speed 3s updates, can be timed using the millis() function. The BlinkWithoutDelay example in the IDE shows you the basic idea of working with timestamps to examine elapsed time.

Also there are simple libraries that could help you, such as SimpleTimer.

answered Mar 22, 2016 at 0:01

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.