If you are going to use an Arduino Mega, you have to edit everything on this sketch that says "Serial" and replace it with ...
Nextion Arduino library provides an easy-to-use way to manipulate Nextion serial displays. Old deprecated Enhanced Nextion ...