Upgrade Code from 2.8 touch Screen to 3.5 touch Screen

My code in the attachment below works for a 2.8-inch screen.
this is the link to the 2.8-inch screen https://smile.amazon.com/gp/product/B01C3R1P2O/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1

Now I want to upgrade the screen to 3.5-inch screen.

My question is how do go about it? I know that the resolution of the two screens are different, so would I have to just change the resolution or is it more complicated than that?

I’m using this Arduino Mega

Thank you

DHT11_Temperature_Control_Ultimate.ino (17.3 KB)

I know that the resolution of the two screens are different, so would I have to just change the resolution

Where, in your code, do you define the resolution? If you can find where you do that (I can't), then that MIGHT be all that you need to change.

or is it more complicated than that?

I would guess that the library you are using expects a specific screen to be attached. You MIGHT be able to tweak the library to work with a different screen, or you might not.

The first thing to do is see if the existing application/library will even make your new screen do anything. What it actually makes the screen do will have a big impact on how big the change effort is. If the application draws properly on the screen, but uses only the upper, left portion of the screen, changes needed are minimal. If the application draws on the screen, centered, not quite filling the screen, then other changes are needed.

If nothing appears on the screen, major changes are going to be needed.

you’re right of the resolution, I couldn’t find it in the code either

I used the 3.5-inch library and tried uploading the code, but all I got was a white screen. So it looks like major changes are going to be needed.

what kind of major changes would need to be made?

I’ve attached the libraries for the 3.5-inch screen

TouchScreen.zip (4.77 KB)

MCUFRIEND_kbv.zip (207 KB)

Adafruit_TFTLCD.zip (136 KB)

Adafruit_GFX.zip (19.8 KB)

what kind of major changes would need to be made?

The ones necessary to make the libraries work.