Page 1 of 11

ST7789 display

Posted: Thu Mar 03, 2022 7:41 am
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

Re: ST7789 display

Posted: Thu Mar 03, 2022 8:05 am
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 3464 times

Re: ST7789 display

Posted: Thu Mar 03, 2022 9:49 am
by jollybv
Thanks Martin

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

Re: ST7789 display

Posted: Thu Mar 03, 2022 11:12 am
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.

Re: ST7789 display

Posted: Thu Mar 03, 2022 3:07 pm
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

Re: ST7789 display

Posted: Fri Mar 04, 2022 10:38 am
by jollybv
Thanks Martin
I managed to sort it all out

Re: ST7789 display

Posted: Fri Mar 04, 2022 11:41 am
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{|}~

Re: ST7789 display

Posted: Fri Mar 04, 2022 4:46 pm
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.

Re: ST7789 display

Posted: Sat Mar 05, 2022 1:19 pm
by WingNut
Brilliant Ben thanks. I'll try it out when I get home later

Re: ST7789 display

Posted: Sat Mar 05, 2022 1:41 pm
by medelec35
There have been some issues with this.
If it does not work for you, I will add a simple sample.