Skip to main content

Questions tagged [time]

Use this tag for questions regarding how to get the time on an Arduino, how to create or use clocks with an Arduino, or anything that has time as a substantial factor in it. Also consider using [programming] or other more specific tags.

Filter by
Sorted by
Tagged with
1 vote
0 answers
60 views

In my project i have a function which i only need to execute if the current time is between given 2 times. Note that the time is fetched from RTC so its 24hr. For example if current time is 23:00,...
Shyam Sangeeth's user avatar
0 votes
1 answer
1k views

I read a comment form here: "Serial.setTimeout() sets the maximum milliseconds to wait for serial data when using Serial.readBytesUntil(), Serial.readBytes(), Serial.parseInt() or Serial.parseFloat()...
ShoutOutAndCalculate's user avatar
1 vote
1 answer
17k views

I am working from the example sketch in that installed with the ESP32 Dev Module into the Arduino IDE. It includes <WiFi.h> and "time.h". I have a number of questions about how to use the ...
John F. Miller's user avatar
1 vote
1 answer
6k views

When using ESP8266 - getting seconds from epoch is done using NTP.begin(NTPserver, 2, true); delay(delay_tries); time_t t = now(); while t stores amount of seconds from 1-1-1970. When trying to do ...
guyd's user avatar
  • 1,049
0 votes
1 answer
469 views

I'm experimenting with the "2 pin capacitance meter" and trying to make it more accurate. Currently I've made the Arduino read 62.5 ns intervals but this means the time for the ADC to read is taking ...
Beacon of Wierd's user avatar
1 vote
2 answers
5k views

Can anyone provide a sample code that would convert a human readable date like 2019-10-27 22:10:35 to a unix timestamp like 1572214235? I found many topics about it, but they eider refer to out of ...
adrianTNT's user avatar
  • 252
-1 votes
1 answer
520 views

How should I convert date format(dd-mm-yyyy) to timestamp value . Can anyone suggest code how to convert and where to put code .
Shivani Dongre's user avatar
1 vote
3 answers
243 views

I'm getting 10 updates/sec from my GPS unit (The MTK3339 used in the Adafruit breakout board), and using it to update a clock display. This works well enough, though there's one minor problem that I'd ...
Sniggerfardimungus's user avatar
0 votes
1 answer
233 views

My Arduino (actually an ESP32-based Adafruit HUZZAH32) is running as a wifi server. Its main job is to service GET requests from a user, and to periodically turn devices on and off based on the ...
RustyShackleford's user avatar
1 vote
1 answer
157 views

To calculate an operation execution time, I was saving the millis() result before and after the operation to calculate the interval time. Is there an alternative on the Arduino Uno like the RDTSC ...
Harini's user avatar
  • 55
2 votes
1 answer
610 views

The Arduino NTP implementation is rather naive in some respects. It basically just grabs the time in seconds from the raw packet, and then converts it to Unix time via subtraction. How would it be ...
user avatar
0 votes
2 answers
395 views

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 ...
Nimish Mishra's user avatar
0 votes
1 answer
536 views

I have function to start an NTP service, right after obtaining wifi connection ( using ESP8266 board ). from time to time, I get an error saying date and time is01-01-1970... which I assume is due to ...
guyd's user avatar
  • 1,049
4 votes
2 answers
23k views

I have a question on how to convert EPOCH timestamps, which I receive as char*, into DD.MM.YYYY and HH:MM:SS format separately? Here is more information on my Arduino project: The Arduino is receiving ...
imax10000's user avatar
0 votes
1 answer
120 views

I am running into an issue with a loop call on an Arduino MKR1000. I have tried the solutions suggested in this question and it usually works for 5 minutes and then collapses. I am trying to make two ...
garson's user avatar
  • 159
0 votes
1 answer
645 views

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 ...
FallenRecruit's user avatar
1 vote
2 answers
1k views

I am a beginner in Arduino, coding, and electrical engineering (learning on my own time) and am working on creating an EEG. I've got the hardware down and have managed to get numerical data output ...
Chris Do's user avatar
0 votes
2 answers
277 views

I want to parse a large number to sync time on my arduino. For this i send it a string with the current time in Unix time format wich looks somethink like this: 1535441277 For this I just call a php ...
Cowboy_Patrick's user avatar
1 vote
7 answers
6k views

What is the shortest/most elegant way (i.e. use existing lib functions) to parse a string in the form of 20180810T143000Z to a time_t? Note that the literal always represents a UTC timestamp. I ...
Marcel Stör's user avatar
1 vote
1 answer
2k views

I'm working on a project that requires calculating the time for which a pushbutton is kept pressed without being released. Is there a code snippet that i can use for this particular need ?
VishwaV's user avatar
  • 111
1 vote
2 answers
368 views

So I'm currently working on an automotive set up. I'm using a 555 timer to emulate a turn-signal alternating voltage pulse (12V to 0V and repeat) for debugging purposes which is output to turnPin/A1. ...
Taylor Jones's user avatar
0 votes
2 answers
91 views

I'm having a very strange problem. I have a Tian that is programmed to send out sensor data to a server every x seconds. My program run well but after 14,15 hours of operation it stops working and I ...
user45899's user avatar
2 votes
0 answers
111 views

Is it possible to store a value of time while you're inside a loop? Entertain the condition: if (condition && value > 0) { timeTrans = millis() + 2000; timeTrans - millis() = value; } ...
Tarik Agcayazi's user avatar
0 votes
1 answer
1k views

I recently started using the TimeAction library (which allows for proto-threading) and I noticed it has a really useful function for enabling/disabling threads. I want to use the same idea but apply ...
walkman118's user avatar
0 votes
2 answers
1k views

I am carrying out a physics experiment using an Arduino. This experiment requires accurate time measurements of upto a millisecond. However I am using a relay to turn on/off an electromagnet and there ...
Harsh Bhardwaj's user avatar