Questions tagged [rtc]

Real-Time Clock. Keeps track of current date/time. Some have batteries like the DS3231, and the DS3231 also has programmable alarms that can interrupt an Arduino.

Real-Time Clock. Keeps track of current date/time. Some have batteries like the DS3231, and the DS3231 also has programmable alarms that can interrupt an Arduino.

186 questions
5
votes
10 answers

DS1307RTC Outputting cryptic 165/165/2165 date. What are some possible fixes?

My board. I think I have it wired correctly (the lights aren't, but the board is). I've read through the first few Google results to no avail. My sample code to test the chip: // Date and time functions using a DS1307 RTC connected via I2C and…
Rashi Abramson
  • 181
  • 1
  • 2
  • 9
2
votes
2 answers

How to prevent an alarm which checks minutes from going off many times within one minute?

How do I prevent an alarm, which checks if the current time matches an alarm time in hours and minutes, from going more than once within one minute? I am using the DS3231 RTC module and RTClib from adafruit. I want to check if the current time…
2
votes
2 answers

Using multiple RTC libraries in one program

There are multiple RTC libraries available, can I load several RTC libraries into my code and then use the functions I like from each one? Will there be some conflict if for example I include DS1307.h and RTCLib.h and other RTCXXXX.h libraries as…
2
votes
4 answers

Creating a clock using Arduino

I want to make a large clock, 16 inch x 7.5 inch, which will display dd Month yyyy. What would be the best way to do this? Does Arduino have a built in clock, and I'd just need logic to turn on/off LEDs on a display that already has dd Month yyyy?…
David Klempfner
  • 167
  • 2
  • 10
1
vote
0 answers

RTC DS3231 Not resetting time on power loss

I'm completely removing power from a DS3231 RTC module and my call to rtc.lostPower() is never hit when I reconnect everything. I'm also removing the battery, I left it overnight and it remembers the time just before I disconnected everything, but…
jb42
  • 11
  • 2
1
vote
2 answers

Aruino RTC using rtclib not understanding functions

I am missing something fundamental using RTClib. When I use the rtc.adjust function to change the time in the RTC, I cannot get the updated time from the RTC, just increments a fixed time. I have searched for examples for what I need, and the same…
RickH
  • 41
  • 1
  • 8
1
vote
1 answer

Strange Output from DS1307 RTC

I'm using a DS1307 RTC (https://www.adafruit.com/product/3296) and an Arduino mega microcontroller trying to simply set and read the time of the RTC. However, whenever I try to output anything to the Serial Monitor, I get stuff like this: The code…
chrispy
1
vote
3 answers

RTC square wave

I have a DS3231 Real Time Clock module and I'd like to use the Square Wave output. I wonder how can I set the frequency of the pulse? How long is the (time) length of the pulse? UPDATED QUESTION In order to use the DS3231 as an 1PPS interrupt, I…
user3060854
  • 590
  • 4
  • 9
  • 19
0
votes
1 answer

RTClib now() within while loop does not update

I ran into this while trying to make a battery monitor and wondered where I went wrong. Using RTClib available in the Arduino IDE or from adafruit github, I ran into problems when trying to call now within a while loop inside of loop. Here is a…
Matt
  • 205
  • 3
  • 9
0
votes
1 answer

Setting Time Function With DS3232 Library

I am trying to set the time on my DS3231, then read that time on my arduino nano. This is for a digital clock project. I am using DS3232 library by JChristensen. He has an example that can set the DS3231 time through the serial monitor, and it…
BobaJFET
  • 135
  • 8
0
votes
1 answer

What's wrong with my keypad and time program?

I really need help here. I'm a total noob in Arduino and this is my first Arduino project. I've been trying to get the keypad to be able to input time for my alarm clock project but I only managed to get the welcome part of the program. But then the…
0
votes
1 answer

exit status 1 'Time' does not name a type

#include #include // i2C Conection Library // Init DS3231 DS3231 rtc; // Init a Time-data structure Time t; uint32_t targetTime = 0; uint8_t hh = 0, mm = 0, ss = 0, dd = 0, bb = 0; //variable Unsignet int 0-255 int yy = 0;…
Hanatsuki
-1
votes
1 answer

Different time betweenTiny RTC and IDE

I have time late in my Tiny RTC when i try to set time at sketch downloading. Library: RTClib.h Setup line: if (rtc.lostPower()) { Serial.println("RTC lost power, lets set the time!"); rtc.adjust(DateTime(F(__DATE__), F(__TIME__))); The problem is…
Teddol
  • 85
  • 1
  • 2
  • 8
-1
votes
1 answer

Restart variable every day

How can I restart a variable every day? I have an RTC1307. The problem is that I can't use an alarm event because the Arduino will be shut down during that hour. So I need a more reliable solution. Will this work? A date could be an…
user58316
-2
votes
1 answer

How to Time the Arduino using RTC that I can operate the valves at 7am, 12pm, and 4 am?

The idea of this project is to open 3 valves one after the other for 5 minutes each, at a time like like 7am, 12pm, 4pm in a day. The for loop should be executed at 7am, where valve 1 is open and water is pumped for 5 minutes, then valve 1 closes…
shasha
  • 1