Problem at displaying sensor value in 2.8" TFT touchscreen mcufriend 0x4747

Go on. I corrected your sketch. Did you try it?

I explained about setTextColor(BLACK, WHITE)