• Connect to NTP server with WiFi

    Daniel Zilinec03/16/2022 at 21:25 0 comments

    My first goal is to display time. And to do it I need the time from somewhere. So I wired the WizFi360 WiFi module and connected it to my local network. I got the time for NTP (network time protocol) server time.google.com. The module has a build-in function to get the time using AT commands so it was really easy. 

    Output from a python script:

    CMD: AT+PING="www.google.com"
    AT+PING="www.google.com"+26OK
    
    CMD: AT+CIPSNTPTIME?
    AT+CIPSNTPTIME?+CIPSNTPTIME:Fri Mar 11 19:53:48 2022
    OK

    Now I need to parse it.

    WizFi360 wired to RPi Pico
    WizFi360 wired to RPi Pico