[Tutor] Alphabet lookup table

Phil phillor9 at gmail.com
Fri Jan 28 04:02:26 EST 2022


On 28/1/22 18:51, Alan Gauld via Tutor wrote:
>
> Assuming this is still part of your LED simulation then yes,
> this is a fairly common approach.
Thank Alan for your reply and yes this is part of my LED simulation 
which is working well. The text to be scrolled is entered by the user, 
me, into a text control and off it goes.
>   You might find it easier
> to use binary rather than hex though.
I thought about that. The LED scroller includes a function that converts 
the hex value to a byte array so it's probably an unnecessary step.
>   And I'd put the letter
> definitions into a separate module - that way it's easy to
> change "fonts" by renaming the files.
>
>
> alpha_table = {
>    'P' : ['0b01111111',
>           '0b00001001',
>           '0b00001001',
>           '0b00001001',
>           '0b00000110'],

Do you mean a listing like this, rather than a class with only one 
method that I already have?

-- 

Regards,
Phil



More information about the Tutor mailing list