3.5 inch display shows white screen

hi

My code works for an Arduino mega with a 2.8-inch touchscreen, and I want to upgrade to a 3.5-inch touchscreen.

My code works for the 2.8 inch-touchscreen just fine.

However, whenever I upload my code to the 3.5-inch touchscreen, I get the white screen

Now I tried some test code that came with the 3.5-inch screen, and the code works perfectly.

The resolution of the 2.8-inch touchscreen is 320x240:https://smile.amazon.com/gp/your-account/order-history/ref=oh_aui_search?opt=ab&search=2.8

The resolution of the 3.5-inch touchscreen is 480x320:https://smile.amazon.com/Kuman-Arduino-Screen-Tutorials-Mega2560/dp/B075FP83V5/ref=sr_1_2?ie=UTF8&qid=1510878289&sr=8-2&keywords=3.5+inch+arduino+touch

The first attachment is my code and the second is the test code I was using to test the 3.5-inch touchscreen.

I'm not sure why my code isn't working, any help is appreciated.

thank you

DHT11_Temperature_Control_Ultimate.ino (17.3 KB)

phonecal.ino (10.4 KB)

You might put this line back into the end of setup and see if it helps. I have accidentally written White onto White before.

tft.fillScreen(BLACK);

what do you mean by "end of setup"?

Compare the Setup subroutines from both the working and non-working versions you posted. Inside the Setup subroutine the last few lines of the code that worked according to you, have two lines that set rotation and fill the screen to black to start. Your code that did not work was missing those two lines. It was just a quick review and may make no difference. Good Luck.

Ok I understand what you're saying and I added those line of code you suggested, but nothing changed I still got a white screen

The code you have is fairly complex with all the buttons. I would start commenting out sections of code until it was simple enough to actually work to display something. Then start putting back small sections until the code causing the white screen could be narrowed to a smaller section. The problem would then be easier to detect. For example if your loop code just tried to display "Hello World" in white, does that work?