Page 5 of 11
Re: ST7789 display
Posted: Mon Feb 20, 2023 1:47 pm
by jan.didden
Hi Martin, yes that could be an option, I really only need the + and - signs and 0 tom 9 digits to read an attenuation value from a few meters away.
Something along the lines as the attached; that's not a very high resolution display but lookes quite professional. But maybe there exists a utility that takes a given bitmap and generates an arbitrary larger one? That should be very handy.
Jan
Re: ST7789 display
Posted: Mon Feb 20, 2023 1:56 pm
by mnfisher
Hi Jan,
I'd probably convert the required characters by 'drawing' them at the required size and font (using the text option), in a graphics package (paint should do it) and then saving as a bmp. Alternatively use something like ImageMagick to do the conversion...
Martin
Re: ST7789 display
Posted: Mon Feb 20, 2023 2:22 pm
by jan.didden
OK, I think I can do that. How do I then access such a bitmap for printing in FC?
Edit: there's a bunch of bitmap drawer functions in the gLCD lib. Back to the drawing board!
Jan
Re: ST7789 display
Posted: Mon Feb 20, 2023 4:26 pm
by BenR
Hello,
Click on the GLCD component and look at it's properties, There you can assign different fonts. Some of the number fonts are very large and will print large without being blocky. The number by the font is the default height in pixels.

- FontSetup.jpg (26.54 KiB) Viewed 6077 times
Re: ST7789 display
Posted: Thu Feb 23, 2023 1:44 pm
by jandidden
Thanks Ben, that works, I hadn't noticed that. It appears that you can select up to 4 fonts as 'font count' and then select any one on the fly. Neat!
Getting an ST7789 display wired up and displaying some text works, but with something funny. My display (ADAfruit) has 240 x 170 pixels which sound to me as landscape, and I entered 240 at the pixel width and 170 at the pixel height box in the properties window, yet the image is displayed in portrait mode. Changing to 170 pixel width and 240 pixel heigt doesn't change anything!
How is that possible? Is there a separate variable for display orientation that I missed?
(There's also the lower quarter of the display (portrait) that shows junk and stripes, but 1st things first).
Can anyone point me in the right direction wrt the orientation?
Jan
Re: ST7789 display
Posted: Thu Feb 23, 2023 2:24 pm
by WingNut
There are 2 places for display orientation. One is in the properties and the other is the macro
Re: ST7789 display
Posted: Thu Feb 23, 2023 6:41 pm
by jandidden
Really? Can you be a bit specific? I don't see it in the Properties, attached.
Which macro are you referring to?
Jan
Re: ST7789 display
Posted: Thu Feb 23, 2023 9:17 pm
by chipfryer27
Hi
In v10, the component propereties has at the very bottom an option to orientate the display during simulation to match Hardware. This isn't available in v9.
However in both v9 and v10, the Component Macro itself has a "SetDisplayOrientation" option that rotates the display in hardware between 0 and 270 degrees.
Regards
Re: ST7789 display
Posted: Thu Feb 23, 2023 9:41 pm
by WingNut
Looking at your image it looks like you have scrolled down to the bottom of the properties and dont have any further to go. On my screen its below the fonts and a set of properties called simulation and appears below font 3. The property is physical orientation.
are you fully updated with the core updates?
Re: ST7789 display
Posted: Fri Feb 24, 2023 8:30 am
by jandidden
OK, thanks @Chipfryer27, found the SetDisplayOrientation ... don't know why I missed that.
(@Wungnut I wasn't interested in the sim so I disregarded that).
Next up is the 'hash' as shown in the attached. I did a ClearDisplay after Initialise to try to get rid of it but that didn't do it.
I also have a suspicion that the wiring is not well dressed becasue of the visible blue short stripes between the characters, so that may also be a factor.
Jan