Micro Dot Phat - Threading?


#1

Loving the Micro Dot pHat, I’m adapting some code for my Internet radio, so essentially replacing a much larger LCD plate with the Micro Dot pHat. I’m not a seasoned coder and I’ve hit a snag:

The code grinds to a halt when it displays scrolling text as it has to wait to go around the loop and doesn’t end gracefully, so essentially broken text :

def scroll_message(text):
clear()
write_string(text, kerning=False)
count = 0
while (count <150):
scroll()
show()
sleep(0.03)
count = count +1

What I’d like is the text to keep scrolling the value until its passed a new value leaving the rest of the code to get about it job? Do I have to dip my toes into threading?