Wednesday, August 19, 2020

Scrolling text on a UnicornHatHD

Scrolling text on UnicornHatHD


I wanted scrolling text on the UnicornHatHD which has a 16x16 LED array, and could only find a program that would do it on the old UnicornHat with its 8x8 array. 

https://github.com/topshed/UnicornHatScroll

If you change a couple of lines in UHScroll.py, it works on the UnicornHatHD.

Change the definition of flip to:-

flip = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]

and change the start of show_letter() to:-

def show_letter(letter,colour,brightness): 

    UH.rotation(0)        

    for i in range(16):

        for j in range(8):

That's all you need to scroll text on the top 8 rows of LEDs. It should be fairly easy to use the lower 8 rows as well...

If I could remember how to use GitHub, I would send them this...


No comments: