Ardiuno/esp TFT mqtt display

which lcd are you using ra8875 or the smaller ILI9341

the ino you mentioned is for the smaller ILI9341. But I assumed from the previous post you were referring to RA8875
RA8875 libary - should be configured properly for the board type
ra8875.zip (435.1 KB)

if using RA8875 I would just try one of the sample sketches first… loaded it to the mega to see if it works with your board and if it does then progress farther otherwise you might have to change some setting for your board ( but I do not think so the ra8875 has changeable setting other then the touch screen-- but the ILI9341 does if using this board )

ra8875
there are two sketches one for the mega and one for the esp
esp set jumper 5,6,7 to on flash the rest off , then flash the uno set jumper 3,4 to on and the rest off… once done set 1,2 to on and the rest off…
here an example of how to flash the wemos r3
the sketch you mention is connected directly to an esp no wemos r3 required ( but i used mostly wemos r2 it is purely an esp board compared to the mega/esp board of the wemos r3 )

this is the sketches for the RA8875