Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

1
vote
1answer
38 views

Osepp DS1307 RTC program error (tmElements_t tm; does not name a type)

Using a basic 1307 SetTime program, and ran into a problem (first time programming a module). #include <Wire.h> #include <Time.h> #include <DS1307RTC.h> const char *monthName[12] = ...
0
votes
0answers
39 views

Using RTC DS1307 and OLED on Arduino MEGA

I'm using RTC DS1307 and OLED on an Arduino MEGA together. When I try to use a rtc code like rtc.adjust(DateTime(F(__DATE__), F(__TIME__))); or DateTime now = rtc.now(); the OLED display starts ...
0
votes
0answers
34 views

Problem using 74HC595 with ULN2803A as LED driver

For a final project I'm making a word clock using three 74HC595 registers and three ULN2803A transistor arrays as led drivers, as well as a DS1307 RTC. The program works great, except for one large ...
0
votes
2answers
80 views

Is there a way to get my MacBook's date and time into Arduino IDE?

I am using a DS3231 RTC module. It requires to set the time every time it is reset. I was wondering if I could read my MacBook's time and date and feed into the module at the setup stage. Is this ...
0
votes
1answer
53 views

Maintaining time in Arduino

I am working on development of alarm clock using Arduino. No doubt RTC will be the best but it increases the Price of the project. Also I opened a digital clock (which I purchased online) and I see ...
0
votes
0answers
50 views

Arduino Pro mini does not wake up after a few interrupts from DS3231

I hope someone can help me. I'm building a GSM water level meter that runs on solar power, using an Arduino pro mini, DS3231 RTC, JSN-SR04T - ULTRASONIC SENSOR, SIM800L along with a DFrobot DFR0535 ...
-2
votes
2answers
51 views

which is the best RTC clock hat hardware and method to use in 2019 [closed]

which is the best RTC clock hat hardware and method for arduino
0
votes
1answer
299 views

'RtcDateTime' does not name a type

I've tested a code that compiles successfully. But after i merged it to another code, here it shown an error says RtcDateTime doesn't name a type. Used library : https://github.com/Makuna/Rtc Some ...
0
votes
1answer
358 views

SSD1306 allocation failed when adding a constant

I am trying to get this code working: #include <Button.h> #include <SPI.h> #include <Wire.h> #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> #include <RTClib....
0
votes
1answer
31 views

servo starts rotating whenever it is plugged

I am making a fish feeder using an Arduino Mega 2560, servo motor SG90 and RTC DS3231. I want to make it rotate twice a day, i.e. morning and 9 o'clock evening. Whenever I plug my Arduino board to ...
0
votes
1answer
54 views

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 ...
0
votes
2answers
52 views

RTC DS1307 VCC not getting connected to 5V of Arduino Uno

I am using RTC DS1307 with "TINY RTC I2C modules" written on it.I had downloaded RTClib library from adafruit and using the example code. I connected GND->GND, VCC->5V, SDA->A4 and SCL->A5. However ...
0
votes
1answer
82 views

How to find the difference between two timestamps

I'm using this time library to access the properties of unix timestamps like hours / minutes / etc. What I want to do is get the current time, and an estimated arrival time, and find the difference ...
0
votes
1answer
61 views

TimeAlarms stops working when using setSyncProvider(RTC.get) DS1307

Been working on this project for some time now, like title states when I un-comment setSyncProvider(RTC.get) in the setup the program fails to get any of the Alarm.timerOnce to run. I have been stuck ...
0
votes
3answers
91 views

backup battery for FeatherWing DS3231, RTC

I am working with slightly modified example code for the Adafruit FeatherWing DS3231 RTC (real time clock) board. The DS3231 chip itself is from Maxim. Since the cell is described as a "backup battery"...
0
votes
2answers
252 views

limit length of the generated timestamp from ESP32 with DS3231 to 13

I am using ESP-WROOM-32 (Olimex ESP32-PoE) with DS3231. I have used the a patch from PR on RTClib to avoid the rollover from the DS3231. Since the DS3231 RTC provides Unix Epoch Timestamps which ...
0
votes
1answer
69 views

Apply patch to library for custom changes in Arduino IDE

I wish to obtain unix epoch timestamps in millisecond precision. I am using an ESP32 along with DS3231 RTC breakout board from adafruit. Apparently the Repository is not maintained often but I see a ...
0
votes
0answers
39 views

RTC Programming

I purchased a DS3231 AT24C32 IIC clock timer (RTC) and I have what I think are pretty simple questions. I have VCC and GND connected and jumped my NodeMCU-12E D1 and D2 pins to the RTC's SDA and SCL ...
0
votes
1answer
96 views

Hibernate Arduino for 12hrs with rtc1302 module

ok, Good morning, guys, with a data acquisition project, in this, I get data every 12 hours, even if it's only 12 hours, the arduino gets connected directly, and it's being powered by a 9v battery, ...
0
votes
1answer
407 views

exit status 1 'Time' does not name a type

#include <DS3231.h> #include <Wire.h> // 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,...
0
votes
1answer
67 views

Tiny RTC module doesn't work properly when connected to an Arduino Uno together with 16x2 LCD

I am trying to make a digital clock using a tiny RTC, 16x2 LCD, and Arduino Uno. The RTC module works fine if 16x2 LCD is not connected to the Arduino. Both RTC and LCD are I2C modules and hence are ...
0
votes
1answer
797 views

How to use RTC memory in NodeMCU to count awakes from deep sleep?

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 ...
-3
votes
1answer
224 views

How we can Create the folder into SD card and gives the path for file to save the data into the folder

I am trying to store files inside a series of folders, depending on month and year. I am using a RTC, and the standard SD library. I have previously gotten the program to set the file name to the ...
-1
votes
1answer
208 views

Unable to save the Date and Time as the filename [closed]

I want to save the filename as current date and time
-3
votes
2answers
292 views

Simulating a real time clock module with software [closed]

I am building a clock with an Arduino. Most clocks have a RTC module or some kind of RTC chip in order to get the time. I do not. How do i replace this chip with software? Is there a C/C++ library ...
0
votes
1answer
28 views

Need help with an Arduino project using a RTC and LEDs

I need some help with a project I am doing involving the DS1307 RTC. I am trying to make what is essentially a way to mins quickly check the time which involves nine LEDs slowly lighting up every 10 ...
0
votes
1answer
261 views

Is DateTime from RTClib giving garbage dates/times?

The RTC is working fine, but I'm having trouble with the DateTime class. Based on the following test, it seems like its math is wrong. #include <RTRlib.h> void loop() { auto ts = TimeSpan(0,...
0
votes
0answers
190 views

Can 2 or more LED strobe Lights Flash in Sync?

I'm trying to build a strobe light that has at least 1 mode that can sync with another unit. The strobe light has 2 colors, white and red which are driven by 2 qlite drivers which are controlled by ...
0
votes
0answers
80 views

Arduino Code hang

I am working on a project to dim/brighten the LED lights between each hour. To make the program readable i have only kept the code for few hours. For example if T1 is at 255 PWM and T2 is 20 PWM, the ...
0
votes
0answers
36 views

My arrays are possibly causing the program to not enter loop?

I'm working on a project to make a digital clock with an 8x32 ws2812 LED grid, arduino uno, and a RTC module. Everything works great separately, but when I integrate it all together the code never ...
-2
votes
1answer
90 views

Does a Sparkfun Redboard Arduino Uno have built-in RTC?

I have a Sparkfun Redboard (an Arduino Uno like board based on the Atmega328P and programmed with the Arduino bootloader). I have been trying to make an accurate clock without an RTC with an LCD ...
-2
votes
1answer
187 views

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 ...
1
vote
2answers
435 views

Using RTC DS3231 + Arduino UNO to calculate time lapsed [closed]

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 ...
1
vote
1answer
121 views

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

Advice for lower power clock type project

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

Keep RTC time in a loop

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, ...
0
votes
1answer
345 views

Adafruit RTC DS3231 Crashing Arduino Uno

I am having some issues with a new DS3231 Precision RTC module. I have made connections as in the guide linked, and when used, the serial output from the Arduino is garbled, and the arduino apparently ...
0
votes
1answer
496 views

Adafruit RTC begin() not returning false

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 ...
1
vote
1answer
973 views

DHT22 and DS18B20 together

I am trying to get DHT22 and DS18B20 to work together. The code below is the one I am using: #include <SD.h> #include "SPI.h" #include "DHT.h" #include <RTClibExtended.h> #include <...
1
vote
2answers
2k views

Arduino Uno alarm interrupt

I am trying to create a temperature-humidity monitor using Arduino and I want to power it using a battery. So, power efficiency is of interest. I am trying to put the Arduino to sleep for x-time (...
0
votes
0answers
76 views

rtc.begin() causes Nixie tubes not to fire

// // Arduinix 6 Bulb ( IN-12 ) // - Also supports Hour and Min. time set. // // This code runs a six bulb setup and displays a prototype clock setup. // NOTE: the delay is setup for IN-17 nixie ...
0
votes
1answer
433 views

PCF8583 with Arduino delay of one second?

I'm trying to interface the RTC chip : PCF8583 with Arduino Uno. I'm using exactly the circuit shown below except instead of the variable capacitor near the crystal oscillator, I've used a 22pF ...
1
vote
1answer
819 views

Setting Time to UTC with Data Logger Shield (with RTC DS1387)

I own an Adafruit Data Logger Shield https://www.adafruit.com/product/1141 I followed this tutorial https://learn.adafruit.com/adafruit-data-logger-shield/using-the-real-time-clock This part of code ...
5
votes
3answers
1k views

Calculate absolute time based on cycles and RTC

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

How to code Arduino to follow schedule

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 ...
1
vote
1answer
830 views

Problem on Arduino Interrupt and RTC

I am doing an experiment. In this experiment I want to start the RTC by presing the external Push Button which is connected with Aquino's pin 2 and take varites of action according to Time. For ...
0
votes
2answers
794 views

Tiny RTC I2C module not working

I bought a Tiny RTC I2C module and it doesn't work. When i run the TimeRTCSet from TIME library all i get is: Unable to sync with the RTC 0:00:00 0 0 1970 0:00:01 1 1 1970 0:00:02 1 1 1970 0:00:03 1 ...
1
vote
1answer
2k views

sleep and wake up arduino mega according to ds3231 interrupt

how can I make my arduino mega sleep during 6pm-7am..and wakes or stay up during 7am-6pm and doing its job like activating the solenoid valve based on my soil moisture sensor reading.this is for my ...
3
votes
8answers
5k views

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 ...
0
votes
1answer
398 views

Time displays on serial monitor but not my LCD

#include <TimeLib.h> #include <Wire.h> #include <DS1307RTC.h> // a basic DS1307 library that returns time as a time_t #define PIN_SCE 7 #define PIN_RESET 6 #define PIN_DC 5 #...