Here's code for scrolling text across a matrix

I’ve been doing some work with the code that Jeff posted, mainly changing the font and also looking to get a 5x7 font working so it can exactly emulate a old “moving message display” that I have (it’s working but needs some tidying/optimising) and I noticed a bug in the code! Line 146 in the original code needs to be changed from:

bit = (((character[row] << colIndex) & 0b1000000) == 0b1000000)

to:

bit = (((character[row] << colIndex) & 0b10000000) == 0b10000000)

There’s a zero missing so it’s using the wrong bitmask and ignoring the first column of each character. I’d spotted the issue before but just put it down to the font. Now I’ve finally tracked it down! :grinning:

Hope this helps!

3 Likes