2 LCD screens One Arduino

I am interested in having two different images appear on two different screens coming from one arduino. However, I am having a lot of issues editing the library codes to be able to do this. Right now, I have successfully made two images cycling on one screen- but now I want to connect a second screen.

I have an Arduino Mega 2560
I am using this LCD screen:
2inch LCD Module - Waveshare Wiki

It has a very specific code using SPI.h- I can't really connect the code here because it would include many source and header files. It basically draws the image using a const char. I know I have to define new pins, but I cant figure out how to distinguish the DrawImage command from one screen to another.

I am just wondering if anyone has any experiences with this?

Normal approach is to give each their own address and print to whichever, simple.
No need to fuss around in any library.

I found this:

Because all devices share the MOSI, MISO, and SCLK lines, all commands sent from the master arrive at each slave device. The SS pin tells the slave whether it should ignore this data or respond to it. Importantly, this means that you must make sure to only have one SS pin LOW.

[edut] Each display might also need a separate "RESET" pin... not verified.

and this:

Here...

1 Like

default way would be you define a second display with a different chip select line and other individual lines like DC, RST, BL.
Data (DIN) and CLK can be shared on the SPI Bus.

Start with a SHORT sketch with just a simple "Hello World A" on display A.
If you have that working.
Add another display B and write "Hello World B" on display B.
If you need more help, provide your code in code tags and links to all relevant libraries.

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