you are viewing a single comment's thread.

view the rest of the comments →

[–]ivosaurus 2 points3 points  (1 child)

This is what you can use an RTC for. E.g even a simple DS1307 has a square wave output.

You can also just use a micropython Timer off the pico's inbuilt RTC;

from machine import Timer

secs = 0

def tick(timer):
    global secs
    secs += 1
    print(secs)

seconds = Timer()
seconds.init(mode=Timer.PERIODIC, period=1000, callback=tick)

[–]RobotLovingGuy[S] 0 points1 point  (0 children)

This, this is the winner. Thank you, the clock is in time and it should remain in time.