How to get the actual date?



  • Hi there, i am new to pycom devices and i try out the example for pytrack from the github and i cannot get the actual date but only stop at year 1970. May i know how can i solve this? Thanks in advance.

    0_1510882886177_e6c3f94d-d27a-441a-9eeb-cab93d8c44c2-image.png

    0_1510882903123_373198ca-ee03-4523-871f-7243d371b246-image.png



  • You need a running WiFi and access to a time server. In the example from robert-HH the internet.

    If you still trying to get the GPS data. You can get the UTC time from the sentence parsed by the lib. And don't forget to read the documentation from the GPS/GNSS chip. The chip sends two sentences according if it receive signals from US or the russian sattelites. But the lib parses only the russian sentence. Maybe the US sentence works better in your area.



  • This post is deleted!


  • @mj According to the documentation:

    import machine
    rtc=machine.RTC()
    rtc.ntp_sync("pool.ntp.org")
    

Log in to reply
 

Pycom on Twitter

Looks like your connection to Pycom Forum was lost, please wait while we try to reconnect.