ST7789 display

For general Flowcode discussion that does not belong in the other sections.
Post Reply
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

ST7789 display

Post by jollybv »

Hi Guys

I'm using the ST7789 display in conjunction with the node mcu esp32 and max6675 temp sensor it is all working. what my problem is is that the screen flickers because every time I print to screen I have to do a clear screen otherwise the new data just get written over the old data and is unreadable. Is there any way I can just write over the one line or just the section where the temp changes. I have tried writing a blank string " " and that dose not work so not sure what else to do.
Also is there any way to display the degree symbol on the display I have tried the "Alt 0176" to get it to display in the string which it dose but not display on the display PV = 25 C
Last edited by jollybv on Thu Mar 03, 2022 8:47 am, edited 1 time in total.

medelec35
Matrix Staff
Posts: 1451
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 512 times
Been thanked: 472 times

Re: ST7789 display

Post by medelec35 »

Hi Brian.
I always convert the number to a string then append it with some spaces before printing the string.
Barometer.jpg
Barometer.jpg (23.76 KiB) Viewed 3409 times
Martin

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 Martin

That worked just fine now is there anyway I can change the background colour from black

medelec35
Matrix Staff
Posts: 1451
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 512 times
Been thanked: 472 times

Re: ST7789 display

Post by medelec35 »

The whole background colour is set within the display properties.
If you want the text to have a different background colour to the default, then you can add a SetBackgroundColour component maco just before the main loop.
If you still have an issue, then if post your flowchart (or pm if private) I will sort it out for you.
Martin

WingNut
Posts: 254
Joined: Tue Jul 13, 2021 1:53 pm
Has thanked: 33 times
Been thanked: 23 times

Re: ST7789 display

Post by WingNut »

"Also is there any way to display the degree symbol on the display I have tried the "Alt 0176" to get it to display in the string which it dose but not display on the display PV = 25 C"
Same here

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 Martin
I managed to sort it all 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 »

WingNut wrote:
Thu Mar 03, 2022 3:07 pm
"Also is there any way to display the degree symbol on the display I have tried the "Alt 0176" to get it to display in the string which it dose but not display on the display PV = 25 C"
Same here
The degree symbol is not currently part of the font set, you can maybe add it manually by drawing a circle in the right place, not ideal but should allow you to procced. If it's something you think we should support then I can look into ways to try and support it.

Another way might be to override one of the existing characters in the font component.

These are the characters in the current default font, let me know if there's a specific character you want to replace with a degrees symbol and also please confirm you are using the default font.
!''#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~

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 »

I've had a play around with the components and managed to add the degree symbol support for the Default and System fonts at standard ASCII positions 167 and 248, please shout if you would like it added to other fonts as it's now quite easy to do. Also any other missing characters can maybe be added in a similar way. e.g. Ω or ²

I'll get the update pushed to the update system now.

WingNut
Posts: 254
Joined: Tue Jul 13, 2021 1:53 pm
Has thanked: 33 times
Been thanked: 23 times

Re: ST7789 display

Post by WingNut »

Brilliant Ben thanks. I'll try it out when I get home later

medelec35
Matrix Staff
Posts: 1451
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 512 times
Been thanked: 472 times

Re: ST7789 display

Post by medelec35 »

There have been some issues with this.
If it does not work for you, I will add a simple sample.
Martin

Post Reply