arduino-libraries/TFT

print/println substitude

sizzlik opened this issue · 1 comments

Hi,
im switching an older project from a lcd (20 char, 4 lines) to a 1.8" TFT i salvaged from a transistor tester (GM328A). It works fine and i can display text (i just need text), but i ran into a problem that is probably easy to fix and im just too stupid to see the sollution. On the simple LCD displays i can use setCursor(), print(), println() ..on the TFT i can just put the text at given pixel coordinates. But if i want to add text in the same line after the text that is already written, how do i know the coordinates? For example with an LCD you can go "display.setCursor(0,0"); ... "display.print("Value: "); ... display.println(variable); to print text plus variable value nice in a row and set the cursor to the next line. The TFT library doesnt support print() or println(), Is there any easy way to find the correct coordinates to put text after text? Right now i can only try&error until i find a good looking spacing. Do i always have to know the pixel width of the characters in a font and calculate the pixel length of a text to find the end of the text or is there any trick i could use? Basically i just have 4 rows of text, with a changing variable next to it that i want to display.
Why isnt the print/println command supportet anyways?

Hi @sizzlik. Thanks for your interest in this open source project. This issue tracker is only to be used to report bugs or feature requests specific to the project. This topic is more appropriate for the Arduino Forum. I'm sure we will be able to help you out over there:

https://forum.arduino.cc/