I was just wondering if there was a website/software that people use for laying out text etc.. on LCD screen?
i.e. it gives you the x.y co-ordinates
Thanks
I was just wondering if there was a website/software that people use for laying out text etc.. on LCD screen?
i.e. it gives you the x.y co-ordinates
Thanks
AFIK, you are using a 128x128 display.
You either use setCursor(x, y) with each print()
Or you use one setCursor(x, y) and print(), println() to move to the next line.
For a small display, you might just use trial and error.
In practice, you draw a screen once. Then update a small number of fields.
Different libraries have different facilities for formatting and overprinting a field.
The simplest is to repaint the field background and print the fresh contents.
Formatting can get fiddly with variable-width fonts.
David.
david_prentice:
AFIK, you are using a 128x128 display.You either use setCursor(x, y) with each print()
Or you use one setCursor(x, y) and print(), println() to move to the next line.For a small display, you might just use trial and error.
In practice, you draw a screen once. Then update a small number of fields.
Different libraries have different facilities for formatting and overprinting a field.
The simplest is to repaint the field background and print the fresh contents.Formatting can get fiddly with variable-width fonts.
David.
Thanks David, very helpful!
And yes it's only 128x128 at the moment. I will probably just use print(), println() for now as it's only a simple weather station, but would like to add borders etc.. in future.
Actually quite complicated given the different libraries, fonts and screen types!
Cheers
Not difficult. Follow Bodmer's examples. He even has a Weather Station (I think)
It is wise to read the tft.width(), tft.height() and calculate your graphics accordingly.
Especially if the display devices change.
OTOH, if you know that you are only going to use 128x128 display, you can hard code all your x,y positions.
David.
david_prentice:
Not difficult. Follow Bodmer's examples. He even has a Weather Station (I think)It is wise to read the tft.width(), tft.height() and calculate your graphics accordingly.
Especially if the display devices change.OTOH, if you know that you are only going to use 128x128 display, you can hard code all your x,y positions.
David.
Great. Thanks again, I will look at that now.