I am trying to do TFT Pong. However, ı have some problems with TFT screen and codes. Actually i almost have done with my project. I need to write score on TFT screen but tft.print or tft.println functions take only characters. So how i can write integers on TFT screen? Secondly, i use potansiometer to read data from user by using map(analogRead(A5), bla bla) but on TFT screen my paddle shakes little bit. Is there any change to prevent the shaking?
Thanks for helping. I added photo of my TFT screen.
Edit:I can write integers on TFT by using:
Also note that tft.print("%d",score1) does not work!
But ı have still some trouble with shaking paddles.
There are a number of possible reasons for the jitter in the paddle position, it is likely however that you are seeing "noise" on the analogue line. If this is the case you could add a capacitor from the analogue line to 0 (GND) or add filtering in software, e.g. a running median, there is an easy to use library for that.