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.
188 questions
-1
votes
1
answer
148
views
RTC DS1307 gives random and incorrect time value [closed]
The RTC module can output the hours as 165, and the minutes as 165. This is some random number that is different every time. Everything works fine, but at random times I get this. Maybe once every ...
2
votes
1
answer
209
views
Why this program runs on an R3 but will not run on R4 Wifi?
I have been working on this program for a few weeks now and finally got it somewhere near finishing. It uploads and seems to do what I want it to do on a R3 board but will not run on my R4 Wifi board ...
1
vote
1
answer
209
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 ...
1
vote
0
answers
155
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 ...
2
votes
1
answer
254
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 &...
-1
votes
1
answer
90
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 ...
1
vote
2
answers
5k
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 ...
2
votes
3
answers
3k
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 ...
2
votes
1
answer
178
views
Arduino code intermittent
I have an alarm for "tea time", "lunch time" and "tea time". It works well at times but occasionally it gets stuck on the alarm not resetting, other times it does not ...
5
votes
0
answers
2k
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 ...
1
vote
1
answer
1k
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 -> ...
1
vote
0
answers
292
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 ...
0
votes
2
answers
357
views
DS3231 with Arduino Nano for Timing precision
I need to synchronize two separate circuit boards working with Arduino Nano. The need is to activate one relay using Arduino-1 after 45 minutes, and another relay using Arduino-2 after 45.36 seconds. ...
1
vote
0
answers
77
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 ...
0
votes
1
answer
390
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 ...
-2
votes
1
answer
314
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 ...
-3
votes
1
answer
400
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 ...
0
votes
3
answers
551
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 ...
0
votes
1
answer
773
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 ...
-1
votes
1
answer
55
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....
0
votes
1
answer
1k
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 ...
2
votes
2
answers
197
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 ...
1
vote
0
answers
354
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 ...
5
votes
1
answer
2k
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 ...
1
vote
0
answers
384
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 ...
1
vote
1
answer
664
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 ...
2
votes
1
answer
954
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 ...
1
vote
1
answer
2k
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 ...
1
vote
2
answers
786
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 ...
0
votes
1
answer
141
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 ...
1
vote
1
answer
247
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 ...
1
vote
0
answers
89
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 ...
0
votes
1
answer
3k
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 ...
2
votes
1
answer
293
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 ...
0
votes
1
answer
305
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 ...
0
votes
1
answer
359
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. ...
-1
votes
1
answer
283
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 ...
0
votes
1
answer
1k
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 ...
1
vote
1
answer
187
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-...
1
vote
0
answers
252
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 ...
0
votes
2
answers
404
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/...
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 ...
2
votes
1
answer
150
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 ...
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 ...
-2
votes
1
answer
2k
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 ...
1
vote
2
answers
8k
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 ...
1
vote
0
answers
76
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 ...
3
votes
2
answers
2k
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 ...
1
vote
2
answers
4k
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 ...
1
vote
1
answer
240
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 ...