ST7789 display

For general Flowcode discussion that does not belong in the other sections.
jollybv
Posts: 125
http://meble-kuchenne.info.pl
Joined: Mon Mar 08, 2021 11:25 am
Location: Cape Town South Africa
Has thanked: 40 times
Been thanked: 11 times

Re: ST7789 display

Post by jollybv »

Hi Guys

I have not been working on this project for some time but now I have a little time and would like to sort out the degree symbol. As you can see it in the previous post that is giving me 4 lines instead of the degree symbol. I am using the Default 8 (legacy font) how would I be able to sort this out?

BenR
Matrix Staff
Posts: 1739
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 440 times
Been thanked: 603 times

Re: ST7789 display

Post by BenR »

Hello,

I'm looking for you now and the default font should be printing out the degree character for any of the following ASCII character values 128, 167, 248.

Can you check what value you're sending for the degree symbol. If you know which character in the string it is then you can do something like PrintNumber( string[charidx] ) to know for sure what the decimal ASCII value is.

jollybv
Posts: 125
Joined: Mon Mar 08, 2021 11:25 am
Location: Cape Town South Africa
Has thanked: 40 times
Been thanked: 11 times

Re: ST7789 display

Post by jollybv »

Hi Ben

What I'm doing is typing Alt 167 º which is the degrees it used to work then I did a component update and it stopped
degree.JPG
degree.JPG (21.27 KiB) Viewed 1546 times

BenR
Matrix Staff
Posts: 1739
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 440 times
Been thanked: 603 times

Re: ST7789 display

Post by BenR »

Hello,

Alt 167 should give you the decimal number 167 but I found that actually this is not guarenteed. It's worth seeing what number the compiled C prints out using the code I suggested as that might give me a pointer to investigate further.

jollybv
Posts: 125
Joined: Mon Mar 08, 2021 11:25 am
Location: Cape Town South Africa
Has thanked: 40 times
Been thanked: 11 times

Re: ST7789 display

Post by jollybv »

Hi Ben

Im not sure what you need me to do PrintNumber( string[charidx] ) I've tried the print number but all that dose is print the 167 and not the character

BenR
Matrix Staff
Posts: 1739
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 440 times
Been thanked: 603 times

Re: ST7789 display

Post by BenR »

Ok so it is confirmed it's 167 being used. Hmm let me look again.

BenR
Matrix Staff
Posts: 1739
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 440 times
Been thanked: 603 times

Re: ST7789 display

Post by BenR »

What happens is very strange.

If you type alt 167 then the number ends up as 186 when you print it out using PrintNumber
alt 248 ends up as 176
Test.jpg
Test.jpg (49.32 KiB) Viewed 1542 times

Anyway I've now supported both of these numbers too, maybe something to do with ASCII to utf8 conversion?

This is now working in simulation

Please can you have a go and let us know how you get on. Latest versiion is now on the update system.

jollybv
Posts: 125
Joined: Mon Mar 08, 2021 11:25 am
Location: Cape Town South Africa
Has thanked: 40 times
Been thanked: 11 times

Re: ST7789 display

Post by jollybv »

Thanks Ben

It is working Like a dream

jan.didden
Posts: 82
Joined: Thu Dec 17, 2020 3:16 pm
Has thanked: 20 times
Been thanked: 12 times

Re: ST7789 display

Post by jan.didden »

Can I tag onto this thread as my issue is similar. When I want to increase the font size to improve distant reading, I only see a FontEnlarger icon (ST7789 display). That makes the resulting number larger but extremely blocky, see attached. Surely there must be an intelligent way to increase the font size without the blockyness. How do I do that? I tried different fonts (from fontnumber 0 to 31) but there doesn't seem a difference between the choices.

Jan
Attachments
blockfont.PNG
blockfont.PNG (3.82 KiB) Viewed 1378 times

mnfisher
Valued Contributor
Posts: 956
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 104 times
Been thanked: 509 times

Re: ST7789 display

Post by mnfisher »

It is a trade off between memory and resolution....

An alternative might be to use bitmaps (just for the digits maybe) - I have some code that handles 1, 4, or 8 bit (256 colour) bitmaps that you might be able to use?

Martin

Post Reply