-1

I need a program to count days, from day 1 to day 21 for my project.

I'm making an artificial incubator and I need to show the days on an LCD.

4
  • 1
    Don't shout, use punctuation to start with. What part you need help with? Counting days in what sense? (with a for loop, or using a real time clock?) Be more precise in your requirements. What do you mean with 'like so' ? Commented Oct 24, 2019 at 11:48
  • google: "DS3231 Arduino". DS3231 is an Real Time Clock module which allows you to keep track of time and date. Commented Oct 24, 2019 at 12:18
  • 2
    If it doesn't need to be very accurate, you can use millis() Commented Oct 24, 2019 at 12:20
  • For what it's worth, one day is just 86400000 milliseconds. Commented Oct 24, 2019 at 16:39

1 Answer 1

0

You can do that easily using Real Time Clock IC. ds1307/ds3231 ic will do the job. Adafruit has Arduino library for that. easy to interface.

I don't supprt using millis() function. you will lose your time if the system power downs or mcu resets. Using RTC chip is safe option as it has backup battery for time keeping.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.