How can I connect nextion displays to multiple megas

Say I have 8 daisy chained arduino megas using their TXD0 and RXD0 serial ports.

and I want to hook up a single nextion display to interact with all
of the arduino megas. Can I just hook up the nextion to TXD1 and RXD1 serial ports
on one of the them or does it need to be connected to all of them via their TXD1 and RXD1? Can I even do that? I dont have experience with serial communication or nextion displays. I would prefer to only have to hook the nextion to only one of them. Thank you

For clearity, can You draw a logic block diagram? What's the project using this design?
Why not use Serial1 and Serial2 for the Daisy chain, leaving Serial0(?) for debugging?

First of all, you must develop a messaging protocol that will tell the Arduino with the Nextion display where to place the data and what it should look like. Next will be the opportunity to develop a priority system so two megas cannot display in the same location. Of course that means you need a way to tell that mega that the data cannot be displayed.
Once that scheme is working, proceed with the real project

You are talking programming right? In what you are imagining how are they hooked up hardware wise?

You can only connect a Nextion to one controller, in this case one of your Arduino Megas. If you want the Nextion to interact with all of them then follow @Paul_KD7HB's advice.

However,
It would be helpful to know why you think you needs more than 1 Mega, generally when people think they need more than one board they don't. So, please explain your project, there is probably a better solution.

Start here:

And here:

The reason for more than one mega is because Arduino nano, minis and unos dont have enough PWM connectors otherwise I would daisy chain those.. Just one RGB LED takes up 3 PWM pins. Now I understand there might be ways dealing with addresses and controlling lighting like they do with LED ribbons but Idont want to use LED ribbons.
In the project each arduino is intended to be isolated from the other physically except for the serial wires connecting them and the power and the ground wires.

16 channel PWM chip

1 Like

Look into Neopixels or WS2812b, a lot of them can be driven by a single pin.

No! I am talking about designing your communication protocol and after that is done, you can begin programming! Look at RS-485 to connect the devices serial ports.

2 Likes

ok thanks I am checking this out. I see what you mean.

Using more processors to increase PWM pins is a beginner's mistake.
With PCA9685 port expanders you can have 16 PWM channels per board, and you can daisy-chain multiple boards. The PCA9685 does not need processor time once PWM channels are set, so all the processing power can go to the display.
Leo..

2 Likes

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.