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.

0 votes
1 answer
108 views

How to read my three-button inputs?

I am creating a three-person reaction time game but I would like to be able to read all three buttons' proximity to the start time - currently only the winner is displayed on the serial read. Here is ...
ggamalero05's user avatar
-1 votes
1 answer
122 views

Use DS3231 with battery and vcc at the same time

I have ds3231 which i want to use to keep track of time even when the in my ase esp32 is without electricity. I however read some difference stuff regarding using the vcc and battery on he same time. ...
acroscene's user avatar
1 vote
1 answer
147 views

Fixing a pedestrian traffic light sequence pattern in a cycle using millis and without delay

I was emulating the pedestrian traffic light cyclic pattern (red, green, green flashing) in the next Arduino code. But when I run this code with my ESP8266 Wemos D1 mini controller, it appears the ...
Hong Christian Lin Jiang's user avatar
0 votes
1 answer
163 views

Unable to get keypad key in while loop [closed]

I'm a beginner into Arduino so I have a little problem where I'm trying to do a countdown on LCD using while loop but I'm also trying to get a key input inside that same while loop. Problem is that ...
DevChips's user avatar
0 votes
2 answers
94 views

Serial Buffer stays empty as soon as it becomes empty once

I have a question regarding serial buffer readout. At program start, I send a serial command to a sensor that 1. activates him and 2. let him send data - that works. When I unplug the sensor, the ...
Gymknopf's user avatar
0 votes
1 answer
3k views

(Why is) getLocalTime() on ESP32 taking several seconds to complete successfully

This is a cross-post from https://github.com/espressif/arduino-esp32/discussions/8653 as it didn't yield any results there. I noticed that getLocalTime() is consistently taking 5-10+ seconds to ...
Marcel Stör's user avatar
2 votes
1 answer
98 views

Functions delaying gesture sensor recognition

I am working on a simple little robot to cure my boredom and all it has is a 64 x 32 OLED for the eyes, and a PAJ7620 Gesture recognition sensor with a Seeeduino Xiao as the main board. Basically, ...
Renier Jr.'s user avatar
-1 votes
1 answer
421 views

localtime - executing one after the other- different time_t, but getting same results

When I try to comapre 2 time_t values I get unexplained behavour time_t t = 12345; time_t T = 67890; struct tm *tm = localtime(&t); struct tm *Tm = localtime(&T); char timeStamp[40]; ...
guyd's user avatar
  • 1,049
2 votes
0 answers
141 views

I goofed: I used a digital output rather than an analog output

OK, I have a little hardware issue I need to fix in software for the time being. I say, "For the time being," because I already have the PC Boards printed, and I need to make do for this ...
Leslie Rhorer's user avatar
0 votes
1 answer
1k views

Arduino Nano 33 BLE getting the current time using RTC

I have a an arduino NANO 33 BLE and I'm trying to get the current time and date. Based on the documentation, the arduino has nRF52840 microcontroller which comes with a 24 RTC timer It is listed in ...
Riperoni's user avatar
1 vote
4 answers
2k views

What is the ideal way to check if time on ESP8266 via NTP is ready?

With ESP8266, I noticed that for the first 1 or 2 loops, localtime returns Unix epoch (1970 date) until it has finished getting the actual time from NTP, after which point I see the real date. ...
Nick Bolton's user avatar
2 votes
1 answer
1k views

Attiny timer interrupt does not make an interrupt every 1000ms

I'm making a stopwatch using an attiny85, the idea was to use the timer interrupts to count the seconds my theory was: since I set the Attiny85 to run at 1Mhz, I can use a presale of 1024; 1000000 / ...
Isael Guillén's user avatar
3 votes
0 answers
2k views

How to correctly synchronize time with NTP server?

I want to synchronize time with NTP server once in some time. I am using DOIT ESP32 DEVKIT V1, I tried with getLocalTime() function but it returned true even without wifi, but as I know without wifi ...
hungryman's user avatar
1 vote
4 answers
1k views

How to efficiently code a long duration timer

I'm working on a battery-powered project. I'm trying to write code, which checks the battery voltage every 30 minutes and changes the color of a LED accordingly. Should I still be using millis() or is ...
Zhelyazko Grudov's user avatar
0 votes
1 answer
3k views

`time.h` vs `TimeLib.h` on AVR boards

Why do I get wrong result when using time.h library when using AVR boards, such Nano/Uno/Pro Micro (while when using TimeLib.h). OUTPUT (for given Epoch ): TimeLib: 2022-04-02 16:11:20 time.h: 0152-03-...
guyd's user avatar
  • 1,049

15 30 50 per page
1
2 3 4 5
15