Multiple arduinos with multiple displays all on I2C

Greetings ladies and gents of the Arduino world. I am working on a puzzle idea that has multiple Arduinos each that has its own 4x20 LCD display. The question is: Since I have multiple Arduinos connected together via I2C one of them has to be the master and the rest slaves. If that is the case then once they are set to slave can I still send display data to the I2C displays from each of the Arduinos?

To make it more complicated the puzzle starts out with one Arduino and one display working by itself with a few buttons and lights. As the puzzle goes on a module is plugged in that adds a second Arduino and screen with a few buttons or pots. Then another with a light sensor. All the data needs to make it back to the first controller as it is the "host" of the game. However if the rest of the Arduinos are set to slave if/how can they also control an I2C screen. I have no programming started yet as I am still in the concept stage. My Arduinos are Megas, all the displays are 4x20 LCD with I2C backpacks. Any insight about the hurdles I will face would be greatly appreciated.

I have a thought in my head that I would just have all of the displays set to receive their display data only from the master and then have all the other Arduinos also be slaves and make it so the slave Arduinos send their data to the master Arduino and then it in turn sends display data to the screens. Sounds like it is overcomplicating it somewhat but I don't know the right questions to ask to be able to google the answers I need. I also don't want to spend a lot of time building something that inherently will have data flow conflicts.
Thank you in advance for your insight
amachinetech

Use serial communication (e.g. Serial1 on RX1/TX1) with RS485. Master can send data to one or more slaves and can poll slaves for data.

I don't say that it can't be done with I2C but if you want to have any hair left ...

2 Likes

yes i am coming to realize this fact. If I would only make simple things my hair would be much fuller and wavy like it was when I was in high school.

What ‘thinking’ do the slaves have to do beyond driving the displays ?
You might be a lot better off with a single processor doing everything.

1 Like

Then let me say it: It can not be done with I2C.
The I2C is not the right bus for this, and it is certainly not plug and play. Use RS-485.
Once you have RS-485 and a single Arduino board as the main controller, then it is up to the code how you let the data flow.

The Arduino Mega is big, loud and expensive. Well, maybe not loud, but very expensive.
For the RS-485, you need a spare hardware Serial port. The boards that have it are: Arduino Mega (50 euros/dollars), Pro Micro clone (7 euros/dollars), Arduino MKR (32 euros/dollars), ESP32 (7 euros/dollars), Raspberry Pi Pico (5 euros/dollars).

Most displays work with 5V, that might be a problem with the 3.3V boards.

:smiley:

@amachinetech
The I2C bus is capable to handle data communication among 77 (127-8) devices. How many I2C devices do you have? Five UNO/MEGA and five LCD -- only 10. You may try. I2C Bus is cool to program! At any time your Slave can send data to the Mater just by interrogating the Master through interrupt.

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