Is there any way of changing the stock Nextion library to allow it to listen to multiple serial ports on an arduino mega (I. E. two nextions at once) ? I know I can abandon the library but with the amount of code I’ve already written around the stock library, I don’t really want to have to rewrite a lot of it.
The short answer is yes. You’ll need to instantiate two Nextion objects on distinct UARTs and following that, two listener object lists which will allow you to put two distinct nexloops as event dispatchers in the main loop. The rest is trivial.
Hi,
I have updated Enhanced-Nextion-Library with multiple display support, if still interested/needed.
This forum is in no way affiliated with NEXTION®, ITEAD STUDIO®, TJC®, or anyone else really. All product names, logos, and brands are property of their respective owners. All company, product, and service names used in this website are for identification purposes only. Use of these names, logos, and brands does not imply endorsement from the respective rights holder(s).