I am trying to implement a digital clock in my Raspberry Pi Zero with a Audio Hat with a 7-segment display with the following code:
import tm1637
import time, threading
import datetime
tm = tm1637.TM1637(clk=5, dio=4)
def curTime():
# display current time
now = datetime.datetime.now()
tm.number(int(f'{now.hour:02d}' + f'{now.minute:02d}'))
threading.Timer(1, curTime).start()
tm.numbers(now.hour, now.minute)
curTime()
The script works just fine, however it messes up a little bit my Mopidy audio streaming... it tere a better way to execute these 2 processes without one conflicting to the other?
Thanks for any help you guys could provide :)