Real time clock sync over WiFi - Pi Pico w - in 6 Minutes

Поделиться
HTML-код
  • Опубликовано: 2 окт 2024
  • In this Video i explain the usage of the RTC real time clock in combination with the NTP Protocoll and update with the WIFI module for the ‪@raspberrypi‬ pico W.
    examples in micro pyhton, for the RTC function, NTP (network time protocol) snyc and how th run a alarm a defined time.
    -------------------------------------------------------------
    Tools i use:
    Wires: amzn.to/3Etm4Nl *
    bread board kit: amzn.to/3PvUTrk *
    LED set : amzn.to/3P94pzo *
    transisotrs: amzn.to/44LrEVZ *
    Pi Pico W: amzn.to/467nAR3 *
    *affiliate link
    ---------------------------------------------------------------
    github link:
    github.com/Lut...

Комментарии • 19

  • @larrywashburn9435
    @larrywashburn9435 Год назад +3

    Just stumbled on your video and subscribed, very related to my project using pico W to collect data over one week for multiple sensors into a CSV format with exact time of reading every 10 minutes. My problem was my university did not allow the ntp ports open to external net but used an internal network time server, which I Knew nothing about. A nice IT Prof explained since I am new to this univ and gave me the IP of the internal time server. in response to why your interrupts might not be working, somewhere on Raspberry pi documentation I saw the interrupt especially in a DEEP Sleep state must be external signal to the Pico. I will check your GitHUb. Great JOb! more Pico W please, with Solar, lipo battery and Lora and MQTT.

  • @evanyang1969
    @evanyang1969 3 месяца назад

    there's a ntptime module now, one can use it to save all the socket horrors

  • @xojupp
    @xojupp Год назад

    Hallo Lutz endlich wieder neuer Content :-)

  • @andyfraser5876
    @andyfraser5876 8 месяцев назад

    I would like to use this to make my dumb EV charger a bit smarter. Ideally it would enable the charger for the same hours each day while the electricity rates are cheaper. Also it would need to adjust for daylight saving. There would be a separate override for emergency charging outside these hours. Any ideas gratefully received, thanks.

  • @RandomBitzzz
    @RandomBitzzz Год назад +1

    Simple and to the point. This is a great example of a block of code that one can use to make their own projects work better.

    • @lutz4tech
      @lutz4tech  Год назад

      Thank you, glad that you Like it, and have fun with your project :-) If you need Something else, let me Know!

  • @tompaquette7138
    @tompaquette7138 Год назад

    That's what you were helping me do much earlier! I'm using a similar method for controlling curtains open and close at set times.

    • @lutz4tech
      @lutz4tech  Год назад +1

      Yes your question inspired my to this one. So thanks again 😀

  • @Skwelch
    @Skwelch Год назад

    hey mate thanks for your suggestion, I am having trouble with setting the alarm for only a certain hour or minute, instead of having to give year and month etc. how would i go about doing that?

    • @lutz4tech
      @lutz4tech  Год назад +1

      You Just want to have this Alarm every day at the Same time ? Then you need to delete the year, month and day in the Check function
      So from this
      def check_alarm(set_year,set_month,set_day,set_hour,set_minute):
      time = rtc.datetime()
      if set_year == int(time[0]) and set_month == int(time[1]) and set_day == int(time[2]) and set_hour == int(time[4]) and set_minute == int(time[5]):
      Need to Change in this:
      def check_alarm(set_hour, set_minute): time = rtc.datetime() if set_hour == int(time[4]) and set_minute == int(time[5]):
      print("ALARM")
      I think this should Work as you need it. Can't proove the Code Just got it on my Phone but i'm Sure you undestand my Intention and can adapt it If the Code snip has a typo.
      Let my know If it Works.

    • @Skwelch
      @Skwelch Год назад

      @@lutz4tech ah yes, thank you! I kept getting errors that I could not solve earlier, that worked after a few easily solved errors. Appreciate you! In relation just to the alarm function (not including any of the network/web based imports) what do I have to import to make it work? I have the phew library handling the network part in my project.

  • @Claire-wg2iq
    @Claire-wg2iq Год назад

    Hi! this is awesome! However, I keep getting "ImportError: no module named 'network'" when I try to run your wifi codes. Any idea of what I'm doing wrong?

    • @lutz4tech
      @lutz4tech  Год назад

      Hi, the answer ist in the Video ;-) i use this lib for savig my Network PW and ssid.

  • @doganozgurmoroy9010
    @doganozgurmoroy9010 Год назад

    Hello.... Where is the mywifi module? I can't find
    Best regards.

    • @lutz4tech
      @lutz4tech  Год назад

      Its only we're i save the ssid and WiFi Password. You can also set it directly.

  • @TOMTOM-nh3nl
    @TOMTOM-nh3nl Год назад

    Thank You