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.

Filter by
Sorted by
Tagged with
1 vote
1 answer
88 views

Code review for timer using RTC and OLED screen

I am building a small art project to display my current age with an accuracy of 1/100th of a second. I am using a XIAO SAMD21, a DS3231 RTC, and a 128x32 OLED screen. Here is what it looks like right ...
Mir's user avatar
  • 113
1 vote
0 answers
76 views

LED button alarm with DS3231 RTC problems

I am a PHP web programmer, but I am a beginner studying Arduino. I would like to inquire about a problem with the following function that I am creating while looking for various references. (This ...
rayhong's user avatar
  • 11
2 votes
1 answer
79 views

RTC DS1307 module not working

I have a problem with an RTC: it doesn't work correctly. When I try to read date or time, I only see the characters "àààààààà" or or the program is blocked. #include <Wire.h> #include &...
Qmails's user avatar
  • 23
-1 votes
1 answer
55 views

Equivalent libary of RTCZero for Arduino UNO

I am a beginner to Ardunino UNO This is my first program to light up an LED strip #include <Adafruit_NeoPixel.h> #include <RTCZero.h> #define PIN 6 #define NUMPIXELS 60 ...
suni's user avatar
  • 101
0 votes
2 answers
2k views

How to use an external 32kHz crystal for ESP32 S3 with Arduino IDE?

I want to use an external 32kHz crystal for RTC with ESP32 S3, but I didn't see any example or tutorial for Arduino IDE, Even when I asked ChatGPT, it gave me some example but the code gave library ...
mehmet's user avatar
  • 287
2 votes
3 answers
697 views

DS3231 not keeping time when Arduino is turned off

I am trying to make an LED clock using an DS3231 to keep track of time, but for some reason, it's not keeping time when the Arduino is turned off. I tried to disconnect the clock from a power source ...
Win Win Tjong's user avatar
2 votes
0 answers
67 views

Arduino code intermittent

Have an alarm for "tea time", "lunch time" and "tea time". Works well at times but occasionally it gets stuck on the alarm not resetting, other times it does not trigger ...
Nic Kemp's user avatar
5 votes
0 answers
1k views

How to set ESP32 RTC clock source

According to the manufacturer's link below, the default RTC timekeeping in the ESP32 is supposedly based on Internal 150 kHz RC oscillator. Apparently, there is another option called Internal 8.5 MHz ...
Randy's user avatar
  • 407
1 vote
1 answer
745 views

DS1302 RTC module running too fast

I am using a DS1302 RTC module with an Arduino Mega 2560 Rev 3. I follow steps on this website since I have no experience with RTC module before. Here are the outputs I am getting. 17:15:21.835 -> ...
Leo Liang's user avatar
1 vote
0 answers
176 views

RTC problems after longer time periods

I'm using the MKR NB 1500 for server sending, an ENV shield for measuring the environment, and an external lithium battery to power the circuit. The internal RTC and WDT on the NB 1500 are used. The ...
5TableLegs's user avatar
0 votes
1 answer
234 views

DS3231 with Arduino Nano for Timing precision

I am in need to synchronize two separate circuit boards working with Arduino nano. The need is to activate one relay using Arduino-1 after 45 min and another relay using Arduino-2 after 45.36 seconds. ...
Lawliet's user avatar
  • 183
1 vote
0 answers
57 views

Adding RTC Library for Arduino Project in Visual Studio

I am working in an Arduino project in visual studio. I need to get and set time to a RTC clock. That's why I am adding a ds3231 header file in my project from GitHub. When I want to build "it's ...
Iqbal Hossain's user avatar
0 votes
1 answer
175 views

is there Raw RTC output?

I have an I2C Real Time Clock, DS3231 RTC module , and I just want something like Unix Time. I'm using the uRTCLib, looking at the class methods but dont see anything like that. I'm thinking there ...
j0h's user avatar
  • 892
-2 votes
1 answer
251 views

1Hz & 32Hz from 32.768 kHz on ATmega328P at 8MHz & DS3231 32K

I have a 32.768 kHz signal at the ATmega328P input. I need to get 2 signals from this signal: 1Hz and 32Hz. How well will it work? How to do this with a ATmega328P Timer/Counter? What gain will the ...
Andre's user avatar
  • 27
-3 votes
1 answer
287 views

How can I use a LCD I2C and a RTC3231 on a Arduino Pro Mini?

On a small project, I have a DS3231 RTC module and a LCD I2C module that I'm trying to connect on a Arduino Pro Mini board. However, both the RTC and LCD require connecting the SDA and SCL to the pins ...
Yanick Rochon's user avatar
0 votes
3 answers
403 views

Can't read through I2C from RTC

I'm using an ESP32 which I connected to a MAX31329 RTC through I2C. Unfortunately I can't read any register from the RTC. After modifying the MAX31328 library didn't work, I tried reading single ...
Martin's user avatar
  • 9
0 votes
1 answer
519 views

Milliseconds using square wave RTC

i am trying to make a code that prints the time hh:mm:ss:ms using RTC,i have made it using millis() but it is not accurate +/-2 milliseconds ho can i make it using sq wave and intterupt here is the ...
Amr Ahmed's user avatar
-1 votes
1 answer
38 views

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....
Teddol's user avatar
  • 85
0 votes
1 answer
585 views

using RTC for storage

I keep seeing stuff about this: https://www.arduino.cc/reference/en/libraries/rtcvars/ when looking for storage for a few variables that survive turning off and on, but then it is only on ESP8266. The ...
Alex028502's user avatar
2 votes
2 answers
159 views

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 ...
roboticBeetroot's user avatar
1 vote
0 answers
294 views

Save Circularbuffer in RTC memory of ESP32

I would like to save my Circular Buffer in the RTC memory of my ESP32 when I use deep sleep. So I have initialized it with RTC_DATA_ATTR but when I go into Deep Sleep I lose the data I've saved. Is ...
EMall's user avatar
  • 11
5 votes
1 answer
1k views

ESP32 how to preserve RTC time during brownout

I want to use the ESP32 built-in RTC clock. In my situation, my ESP32 will not have access to an NTP server I do not want to use external RTC modules ESP32 provides a pin VDD_RTC will powers the RTC ...
mquevedob's user avatar
1 vote
0 answers
324 views

RTC DS3231 always remember the old time

I try to change time on windows to test my programing condition but RTC usually keep old time when i change time on windows and re-upload the code . I'm also removing the battery and cut the power it ...
Otaku ICT's user avatar
1 vote
1 answer
423 views

Why the unsigned long is overflowing?

I want to convert hour to seconds but unsigned long is overflowing, here's the code: #include <Wire.h> #include <DS3231.h> RTClib myRTC; unsigned long seconds; char timestr[9]; void ...
ElectronSurf's user avatar
2 votes
1 answer
692 views

Second I2C on Due RTClib, can't start

I am using SDA1, SCL1 for my DS3232 with RTClib on Due. It works on a Mega2560 on SDA, SCL. I ran I2c_test with success after I inserted #define Wire Wire1 However with ds3231.ino this define doesnot ...
Marlin Turbett's user avatar
1 vote
1 answer
1k views

DS3231 RTC not working with ESP32

I am using ESP-32-WROOM-32 with a RTC DS3231 module. I have connected SDA & SCL pins of RTC DS3231 with ESP32 D22 and D23 pins. Also, the VCC of RTC is connected to 3V3 of ESP32 and the GND of RTC ...
Excalibur's user avatar
1 vote
2 answers
541 views

Arduino Motor Control at a Specific Time

Hello. Currently I'm working on creating an automatic dog food dispenser. I'm using a Arduino Uno R3, an L298N stepper driver, a DS1307 RTC breakout board, a Nema 17 stepper motor, and a breadboard to ...
Carter's user avatar
  • 131
0 votes
1 answer
86 views

DS1337 with shared I2C pull-up

I have a project using an ATMEGA328P and a DS1337 RTC chip. The DS1337 is an 8 pin IC with VCC at pin 8 and GND at pin 4. According to the datasheet both pin 5 (SDA) and pin 6 (SCL) need an external ...
jhorv's user avatar
  • 41
1 vote
1 answer
213 views

How to get time from RTC after wake up from sleep?

I have a setup with an Arduino Pro Mini, a DS1307 RTC, a microSD shield and a microswitch. I've set an interrupt to the microswitch, so it'll wake up the Arduino when it changes status. Here is some ...
Rothens's user avatar
  • 123
1 vote
0 answers
69 views

RTC shield with LCD and Keypad

I am having issues with a code that I have been modifying. I can change the TIME, and DATE from a keypad, and see the data on the serial monitor, but it is not recording on the SD Card. Anyone that ...
Merkhav's user avatar
  • 31
0 votes
1 answer
2k views

Get time as 24 hour format from RTC

I have a DS3231 RTC module. I would like to get the time from the RTC as 24 hour format not 12 hour. The library that I'm using requires that I pass in 2 Boolean values into Clock.getHour(), however ...
Coder9390's user avatar
  • 472
2 votes
1 answer
242 views

How to attempt connection to WiFi only once?

I am working on a garden timer project, I connect to WiFi once and if its successful show time from NTPClient or else show time from RTC. I have been done the above, and it works in the sense that if ...
Coder9390's user avatar
  • 472
0 votes
1 answer
241 views

Arduino RTC SD Card problem

I am using a script on an Arduino to record BME280 data onto an SD card and to display it on a lcd display. To have a valid time stamp I am also using a DS3231 RTC module. I set the time succesfully ...
Kj Ell's user avatar
  • 11
0 votes
1 answer
278 views

Coding for RTC and stepper motor

How easy is it to create a code using an RTC to rotate the stepper motor one way at a specific time and back the other way at a specific time? and that time being charged different months of the year. ...
Rossatron 's user avatar
-1 votes
1 answer
209 views

Connect multiple Arduinos to ESP32's RTC?

Depending on usage frequency, may get the occasional collision where both test for availability at the same time - if occurring too frequently, maybe add something simple like one arduino only does ...
adamaero's user avatar
  • 198
0 votes
1 answer
803 views

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 ...
Matt's user avatar
  • 205
1 vote
1 answer
139 views

Incorrect DateTime value constructed

I'm working on alarm clock project using Arduino Nano (v 3.0, clone) and RTC module ZS-042 (containing DS3231 and EEPROM AT24C32). The intention is to load the hours and minutes from EEPROM on start-...
murphy's user avatar
  • 11
1 vote
0 answers
205 views

RTC DS3231 headache

I've been trying to get an RTC clock to display time. I tried using 3 different RTC modules: standard ds1307, pcf8523 and ds3231. They all give the same results: wrong time and no incrementing. It ...
Javier's user avatar
  • 11
0 votes
2 answers
318 views

Problem understanding how to program DS3231 RTC

I need to send a pulse to an Arduino at every one hour. I don't need day, month, year etc. I just want a pulse from DS3231 at every 1 hour through the square wave pin. https://github.com/...
Jack Danniels's user avatar
3 votes
2 answers
2k views

Nextion Display not getting updated data

I am using an Arduino Mega to display the readings of 4 pots on a Nextion Display as well as store them on an SD Card with a time stamp. I keep getting: recvRetCommandFinished err on the serial ...
Niteesh Shanbog's user avatar
2 votes
1 answer
122 views

Arduino with interrupts enters in a locking state

I am quite noobish with using the interrupts on Arduino and I am facing a strange problem. I am using an Arduino Pro Mini, a light sensor and an RTC module(DS3231) which has set 2 alarms, one at ...
Emanuel Giurgiu's user avatar
0 votes
2 answers
1k views

ESP32 feedback from NTP

The basic example for ESP32 NTP is very rough: void setup() { Serial.begin(115200); //connect to WiFi Serial.printf("Connecting to %s ", ssid); WiFi.begin(ssid, password); while ...
Mark's user avatar
  • 393
-2 votes
1 answer
1k views

Sync of Time Library and RTClib

Trying to understand the two libraries and setSyncProvider(RTC.now). Using Arduino Uno with Adafruit ChronoDot. Aduino IDE 1.8.13. The code below is simply to understand what is happening. I am ...
RickH's user avatar
  • 41
1 vote
2 answers
6k views

Arduino Time Library and RTC Libraries

I am using RTClib.h and TimeLib.h with an Uno. Have been struggling for days in understanding the various RTC libraries available and how to use them with the Arduino Time Library. Question 1. If I do ...
RickH's user avatar
  • 41
1 vote
0 answers
67 views

RTC and Time Library Problems

Want to use Arduino Time library and occasionally sync it with an external RTC (Maxim DS3231 chip). I am turning LEDs on and off based on time and using a shift register (Nexperia 74HC154PW) and ...
RickH's user avatar
  • 41
3 votes
2 answers
1k views

Set control register to low in ds3231 rtc

I have been using ds3231 rtc module for keep tracking and make alarm along with backup battery. when I used it for first time it worked fine. but now it doesn't keep track my time when the power lose ...
Sharifdeen Ashshak's user avatar
1 vote
2 answers
3k views

Real Time clock module error-DS3231

This is not a code error I have been using DS3231 RTC module with battery. When I bought this module It worked perfectly now when I get it to use, The time is running perfectly. when I set the current ...
Sharifdeen Ashshak's user avatar
1 vote
1 answer
221 views

Help in personal alarm clock project, cant write time on seven segment display

I'm trying to make a type of Arduino alarm clock, which when the time I inputed is equals to the current time, a servo will turn on my lights. It basically consists of a Keypad, an RTC DS1307 and a ...
Marcelo_M's user avatar
  • 121
1 vote
1 answer
234 views

ESP8266 with RTC DS1307 shield - WS2818B shield won't blink - I2C issue?

Dear Ladies and Gentlemen, I'd like to let a LED blink base on the time of the day. So I took Wemos D1 mini and a WS2818B shield and a RTC DS107 Shield for the before mentioned ESP8266 model. Based on ...
owi's user avatar
  • 11
1 vote
0 answers
68 views

Cannot read from DS3231

I'm having issues with a DS3231 RTC connected to an ESP8266. I can write to it to set the time (Wire.write returns 1), but anytime I try to read from it, Wire.requestFrom always returns 0. I've tested ...
Antoine's user avatar
  • 125