micropython-tm1637
micropython-tm1637 copied to clipboard
TM1637. tm.scroll on 6 digit display does not work correctly.
Hi All,
i am having this display:

My code is:
#!/usr/bin/python
import tm1637
from time import sleep
tm = tm1637.TM1637(clk=21, dio=20)
tm.brightness(0)
def swap(segs):
length = len(segs)
if length == 4 or length == 5:
segs.extend(bytearray([0] * (6 - length)))
segs[0], segs[2] = segs[2], segs[0]
if length >= 4:
segs[3], segs[5] = segs[5], segs[3]
return segs
var = '1234567890'
tm.write(swap(tm.scroll(var)))
The problem is that text does not scroll correctly. It goes like that:

Function code:
tm.write(swap(tm.encode_string(count)))
displays fine.
Am I coding something wrong? If my code is OK , are you able to fix it?
You're right. Scroll doesn't work as expected. I'll look into it and make a fix.