displaying multiple values on TFT screen

hi all

I am playing with a tft screen and a moisture sensor for a bit of practice.

What I want to do is display the analog value and the voltage on my tft screen. I am able to read and calculate the values and they are correct.

I don't know why but only the voltage value is being shown on the screen, both show when I use the serial monitor.

I am very entry level when it comes to coding, maybe I have mad a stupid mistake?

thanks in advance for the help.

here is my code currently: (attached)

screen_test_A_OK.ino (1.78 KB)

Serial.print() can print String, char[], int, float, ...
TFTscreen.text() can only print char[]

The clue is in the method name. Mind you, SensorVoltage is a char[]

and you have used dtostrf() correctly:
char * dtostrf( double __val, signed char __width, unsigned char __prec, char * __s)

However you are too mean with your SensorVoltage[4]. You are not allowing for the terminating NUL character.

David.