lexus2k / lcdgfx

Driver for LCD displays running on Arduino/Avr/ESP32/Linux (including Rasperry) platforms
MIT License
357 stars 51 forks source link

How to use multiple displays? #61

Closed mc-fu closed 2 years ago

mc-fu commented 3 years ago

Hi there,

someone has a working example to use for two or even more displays? Regardless if two of the same type or different ones. How to deal with the correct CS selecting the right display? Maybe someone ever did this and can help a little bit with this.

Thanks and best regards

lexus2k commented 3 years ago

Hi, how about the case below? You need to specify only CS pin different.

DisplaySSD1331_96x64x8_SPI display1(4,{-1, 6, 5, 0,-1,-1}); // 4 - RST, 6 - CS, 5 - DC 
DisplaySSD1331_96x64x8_SPI display2(4,{-1, 9, 5, 0,-1,-1}); // 4 - RST, 9 - CS, 5 - DC