Skip to main content

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
10 votes
3 answers
70k views

What is the best way to convert between date, hours, min, seconds to Unix timestamp in milliseconds in Arduino? I need to have this conversion, since I'm using RTC (date, hours, min, secs etc) and ...
Dzung Nguyen's user avatar
8 votes
1 answer
33k views

I've run into an issue trying to combine 2 different Arduino timer projects I've found online. For both projects I'm using a DS3231 RTC, but have been able use the DS1307 library just fine in my ...
Vinterwoo's user avatar
  • 259
5 votes
10 answers
15k views

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 ...
Rashi Abramson's user avatar
5 votes
3 answers
3k views

I'm developing a low power data logging device. It samples sensors at the frequency of 20Hz, and also has a real time clock for absolute time (the logged time need to be exact down to ms). I think ...
Dzung Nguyen's user avatar
5 votes
1 answer
2k views

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
5 votes
1 answer
2k views

I have a few RTC modules with a batteries. All of them have this same issue with my project. They work fine when connected via USB. But if I disconnect the power then reconnect they reset to Jan 1 ...
futurebird's user avatar
5 votes
0 answers
2k views

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
4 votes
2 answers
2k views

Summary I'm having problems with my RTC draining its coin cells quickly - fresh batteries are drained in a few months. The RTC is set to signal an interrupt every 5 minutes, and I wonder - if there ...
Tyler's user avatar
  • 217
3 votes
6 answers
23k views

I have an Arduino Uno with a motor shield, as well as a DS1307 RTC that I am using to control 2 pumps. Ideally I would like to set a start time (startHour + startMinute) and end time (endHour + ...
Vinterwoo's user avatar
  • 259
3 votes
3 answers
830 views

I recently bought a DS3231 RTC, but I cannot seem to figure out how to get it to work. I have tried all different tutorials and example programs but I keep getting 2165.25.165 165:165:165 as the ...
Zelkins's user avatar
  • 135
3 votes
2 answers
1k views

I want to run cameras at a remote site from external batteries as long as possible. I need power-miser Arduino to switch battery power on/off at set intervals (e.g. 5 min) during daytime only. I am a ...
jules's user avatar
  • 75
3 votes
2 answers
2k views

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
3 votes
1 answer
9k views

I want my solar array sun tracker to shut down at night then move full east in the morning to catch the first rays. I know the DS3231 can set alarms but it is not clear from its documentation how ...
SDsolar's user avatar
  • 1,175
3 votes
1 answer
6k views

I am using an UNO with a RTC to control a light board. I'm using a simple control structure to decide when to turn things off and on. It's my understanding that a time_t value is just a number (number ...
Vinterwoo's user avatar
  • 259
3 votes
1 answer
1k views

I'm using an Adafruit NRF8001 Low Energy Bluetooth module and a Real Time Clock module with my Arduino board. I want to connect to the BLE module using UART to set the clock. I'll also be using UART ...
Ian Nebbiolo's user avatar
3 votes
2 answers
2k views

I am doing a data logger with an Arduino Mega2560 and I want to use a code to make it sleep when no measure is needed and wake it up with an RTC when time comes. The reason I want this is because I ...
JamesONeil's user avatar
3 votes
2 answers
2k views

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
3 votes
0 answers
227 views

I'm building a data logging device with BLE capability using RFduino. Sensors are read using timer interrupt to a buffer. When the buffer is full, then the whole buffer is written to SD card. At the ...
Dzung Nguyen's user avatar
2 votes
3 answers
10k views

I'm experimenting with a Nano, and trying to trigger an action around twice a day. I'm aware that it's not super accurate, but I don't really mind, as long as it's in the ballpark. I've tried using ...
user379468's user avatar
2 votes
1 answer
2k views

i have some data logging to do. And i want some what accurate time meaning accuracy has to be +/- 1 minute. I have considered a RTC, but then i thought. When i was 10 i got a watch that kept time ...
Magic-Mouse's user avatar
2 votes
2 answers
5k views

I have a new DS1307 (original, not a Chinese rip off), with a new battery. It is working great, but when I turn the Arduino off (it is currently connected to laptop) and then turn it back on, it ...
Rok Dolinar's user avatar
2 votes
3 answers
3k views

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
2 answers
373 views

I've got a question concerning the Arduino library "RTClib" by Adafruit and the use of the word "static". Here you can see an excerpt from the example provided for the pcf8523 real-time clock: #...
blackdaw's user avatar
2 votes
2 answers
2k views

I am programming my arduino with the capability to keep time with the DS3231 from Adafruit. I do not have the module yet, but am trying to figure out the rest of the build without it. However, it ...
Snappawapa's user avatar
2 votes
4 answers
335 views

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 ...
David Klempfner's user avatar
2 votes
1 answer
254 views

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
2 votes
1 answer
293 views

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
  • 512
2 votes
1 answer
150 views

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
2 votes
2 answers
468 views

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....
Allan Bowman's user avatar
2 votes
6 answers
4k views

I am running a small project. I want to use an Arduino Mega 2560 v3, a PIR sensor, a micro SD card module, an RTC 1307 module, some LEDs, buttons and a buzzer. To enable and disable motion detection ...
GarryMoveOut's user avatar
2 votes
1 answer
209 views

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 ...
user115219's user avatar
2 votes
1 answer
954 views

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
2 votes
1 answer
3k views

I am working on ESP32 And want to set RTC from the NTP server. How can I get epoch value I have done this thing on CC3200 launchpad and used an NTP server library to obtain epoch value.
Abdul Wasey's user avatar
2 votes
1 answer
237 views

i have took below code from https://lastminuteengineers.com/ds1307-rtc-arduino-tutorial/. i am not understand what these codes are doing. please help me to understand. Wire.write((int)(eeaddress >&...
Suman Ponmathan's user avatar
2 votes
2 answers
911 views

I am a beginner with no coding background. I am trying to figure out an alarm that tells people how long they have been sitting on their chair. The concept is very simple when the person would sit in ...
ashish chaudhary's user avatar
2 votes
1 answer
525 views

Arduino newbie here! I'm a programmer but my hardware knowledge is ... slim. I'd like to build a clock type wake up timer for my daughter, using an Arduino type board. Probably overkill, but it's ...
Whelkaholism's user avatar
2 votes
1 answer
285 views

I recently started a project with HC-SR04 sensors and RTC DS1302 clock. The idea is when a sensor detects an object, call and keep a timestamp (hh:mm:ss) all over the loop until Else If{} appears, ...
MGL1080's user avatar
  • 21
2 votes
2 answers
4k views

I'm working on my system and I have to make arduino repeat such action or block of code if its the set time .. I'm using DS3231 module to track date and time .Example If I set the time in 6:00 AM and ...
kaisar Great's user avatar
2 votes
1 answer
731 views

I'm trying to make my sketch smaller. Right now I use an array for the AM/PM part of my time display. My thinking is this makes it easy to change the formatting: char* ampms[]= {"am", "pm"}; void ...
futurebird's user avatar
2 votes
1 answer
178 views

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 ...
Nic Kemp's user avatar
2 votes
2 answers
197 views

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
4 answers
487 views

I have a datalogger using the RTC DS3231 as an interrupt generator. I am able to have the interrupts work but here is my problem. I would like to take 2 separate measures from 2 different sensors (one ...
JamesONeil's user avatar
1 vote
3 answers
367 views

I'm working with lightblue bean. I have a device that writes data to an SD card on a long button press and switches what will be written (from a list of 5 items) on short button press. The output, ...
futurebird's user avatar
1 vote
4 answers
2k views

I have two questions want to ask I'm using Arduino Uno with 16*2 LCD Blue ( also I have temp. sensor and two motors also 3 limit switches) ,, my code is working good, but sometimes my lcd stop ...
user avatar
1 vote
1 answer
664 views

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
1 vote
2 answers
8k views

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
2 answers
1k views

RTC seems to be sporadically returning bogus date/times. Here are the logs from my serial monitor: 2016/3/23 8:19:46 2017/3/23 8:19:46 2016/3/23 8:19:46 2016/3/23 8:19:46 2016/3/23 8:19:46 2016/3/23 ...
Shpigford's user avatar
  • 484
1 vote
1 answer
582 views

I have an arduino setup with LCD, RTC, EEPROM, Reed Switch, AC/DC Buck Converter, 4X4 Keypad. What PIC IC will let me connect with all these(40 Pins), and yet accept Arduino Code. I don't want to ...
hindisong.cc's user avatar
1 vote
2 answers
4k views

Problem: I need to retry at least 3 times (before giving up) to reconnect my NodeMCU if it doesn't get connected to Wifi, through deep sleep cycles in order to save batteries. I thought to use RTC ...
Fabio Marzocca's user avatar
1 vote
1 answer
4k views

I am using Arduino UNO with a RTC DS3231 module. I have connected SDA & SCL pins of RTC DS3231 with Arduino SDA & SCL pins near AREF pin. RTC module is having attached battery also. My code is ...
Sashi Kant's user avatar