Rtc for analogread each 30 minutes

Hi Everyone,
I wish to measure the temperature (analogread sensor) each 30 minutes without delay. Is it a good way to use a RTC.

If time = XXh30 or XXh00
then temperature = analogread(A0)

if you have a better way to proceed im intereted

:slight_smile:

An RTC will allow you to time the 30 minutes very accurately. If timing accuracy is not so important then you can use millis() for timing

What level of timing accuracy is required ?

not really accurate for one project !! I can use millis() for 30 minutes ??

and accurate for an other one

Yes, you can use millis() for 30 minutes. You can actually use it for periods up to 49 and a bit days, but testing takes a long while :grinning:

Try the BlinkWithoutDelay example sketch with a period of 1800000 and see what happens

THANKS FOR YOUR HELP :slight_smile:

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