Getting Started | Real-Time Clock vs. NTP Tracking Time w/ Arduino & ESP32 (DS3231 RTC) | BRK-00026

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ม.ค. 2025

ความคิดเห็น • 28

  • @TheAlibigdeli
    @TheAlibigdeli 4 ปีที่แล้ว +8

    nice one actually i was using ds3231 lib it self but i always had problems with ntp sync
    like there is a part which people need to sync their time with ntp instead of time on the device i leave the function below for those who need it:
    void SyncTime()
    {
    struct tm timeinfo;
    if (!getLocalTime(&timeinfo)) {
    Serial.println("Failed to obtain time");
    return;
    }
    Serial.println(&timeinfo, "%A, %B %d %Y %H:%M:%S");
    //rtc.adjust(DateTime(year, month, day, hour, minute, second));
    rtc.adjust(DateTime(timeinfo.tm_year + 1900, timeinfo.tm_mon + 1, timeinfo.tm_mday, timeinfo.tm_hour, timeinfo.tm_min, timeinfo.tm_sec));
    }

    • @datasith
      @datasith  4 ปีที่แล้ว +1

      Ali to the rescue! Thanks so much for sharing!

    • @adabill295
      @adabill295 4 ปีที่แล้ว

      I'm building a timer for a light that comes on at Dusk-60 minutes and goes off at Midnight+60 mins. I am using a DS3231 RTC and was wondering how to check the RTC's accuracy after a month or two. I live in Michigan USA and I have to constantly change the light time to account for both DST and seasonal changes to dusk (disk2dawn). I want the timer to be "hands off" but had problems setting the clock initially and adjusting the clock if it drifted. This gives me an idea on how to use the internet to set the clock initially and check it after a month or two to see how it has drifted. There is already a way to use my smart phone to enter my internet credentials, if needed to get it initially connected. An OLED on the project box to show times (current, dusk(DST Adjusted) and OFF time). only one button to Force ON/OFF if needed. Connecting to the internet will mean I don't have to depend on attaching it to my computer and having to download the new program when the time needs adjusted. THANKS to both of you for the idea and code !

  • @Dvir1300
    @Dvir1300 4 ปีที่แล้ว +3

    Nice video. Thanks!
    What I'm looking for - is the complete solution: To connect to the NTP server (Maybe using the NTPclient example that comes with the ESP8266 basic library, using simple UDP communication), and use its input to update the DS3231 module - so also when off-line the time will stay correct.
    Would you please make "Part 2" Video with this complete proccess?
    Many thanks!

    • @datasith
      @datasith  4 ปีที่แล้ว +1

      Thanks for watching! I wanted to do exactly that, but I wanted to keep the "Getting Started" video as simple as possible. I'll add it to the (long) list of vids in the queue :)

    • @Dvir1300
      @Dvir1300 4 ปีที่แล้ว +1

      Thank you for that!
      I think it's reletavely simple to do it as "Part 2" of this video, as the basics are already here.
      I'll be staying tuned to see when it comes.
      All The Best!

  • @praveenraj29
    @praveenraj29 3 ปีที่แล้ว +4

    Great Video! I believe ESP32 has an inbuilt RTC available in it. Can you we use the ESP32- RTC to get time data and will it work properly if we provide battery power without interruption for ESP32? (Anyone have tried it, please let me know as well) Thanks in advance

  • @andrasparanici5491
    @andrasparanici5491 4 ปีที่แล้ว

    Nice! Thank you! What I was looking for!

  • @MindfulDiariesSofia
    @MindfulDiariesSofia 2 ปีที่แล้ว

    Can I use the rtc lib with the RV3032 rtc? I dont find any lib for that one :(

  • @rgmtb
    @rgmtb 4 ปีที่แล้ว

    Would this board be good to trigger a wake up interrupt? If I wanted to put a device into deep sleep (like a weather sensor) and have it awake could this do it? What's the battery life on this? Thank you

    • @datasith
      @datasith  4 ปีที่แล้ว +1

      Sh*t man, sorry for the super late reply! I would use the RTC board so that when the device wakes up from deep sleep, it can have an accurate sense of time. Not so much for waking up the device.
      Most chips these days will have the deep sleep functionality built in, which you can set by software. If you want to use an external hardware trigger, then you can build any circuitry you'd like for doing this, but there's little advantage to that, and you'd also need to power yet another device. So, I'd recommend giving the built-in one a try.
      Here's a good set of posts with examples:
      blog.voneicken.com/projects/low-power-wifi-intro/

    • @Dvir1300
      @Dvir1300 4 ปีที่แล้ว

      AFAIK, the DS3231 module has an "alarm" option, and some extra pins that may be used to 'send a pulse' to wakeup by an interrupt. But I'm not sure, and would be glad to get smarter with that by someone that knows better.

  • @jasonmare33
    @jasonmare33 ปีที่แล้ว

    good job ! thanks

  • @dniellobodesousa3555
    @dniellobodesousa3555 2 ปีที่แล้ว

    Estou usando uma esp 8266, quais pinos se usa?

  • @scienceprojectsofdccpn3430
    @scienceprojectsofdccpn3430 2 ปีที่แล้ว

    thank you ❤

  • @stevenalexander7259
    @stevenalexander7259 3 ปีที่แล้ว

    can we use for display Millisecond ?

  • @adilanizuly5740
    @adilanizuly5740 4 ปีที่แล้ว

    Nice video. Thanks!

  • @muctop17
    @muctop17 4 ปีที่แล้ว +1

    Phineas: "Ferb, I know what we're gonna do today!"
    Cisco: "Allright! Let´s do this!"
    Tnx! Just perfect, as allways!

    • @window.location
      @window.location 4 ปีที่แล้ว

      Also Phineas: *where is perry*

    • @datasith
      @datasith  4 ปีที่แล้ว

      Hahah, thanks for the kind words and the chuckle 😊

  • @jorgeDeveloper80
    @jorgeDeveloper80 3 ปีที่แล้ว

    muy bueno el video .y la camiseta de maradona

  • @dennishopper8687
    @dennishopper8687 2 ปีที่แล้ว

    not a single bit of code?

  • @imottofeivel2479
    @imottofeivel2479 4 ปีที่แล้ว

    Hey, love the vid! Can you make a tutorial on making a esp8266 remote controll for a rc projects like a rc car

    • @datasith
      @datasith  4 ปีที่แล้ว +3

      Ha! Perfect timing. Funnily enough, that's going to be one of my next two videos. Stay tuned!

    • @imottofeivel2479
      @imottofeivel2479 4 ปีที่แล้ว

      Great!! Thank you.