adafruit / Adafruit_ILI9341

Library for Adafruit ILI9341 displays

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Connect two ILI9341 to same esp

pfugazzi opened this issue · comments

Hi,

I'm trying to connect two ILI9341 to same esp to show two data on the same time.

I've created an array of instance but seems that isn't working, at tft.begin feel both display are reset even if the CS pin is diffferent.
Do you have any suggestion?

Here below the code

Adafruit_ILI9341 TFTlist[]= {Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_RST),Adafruit_ILI9341(TFT_CS1, TFT_DC, TFT_RST)};

for (i=0;i<2;i++){
TFTlist[i].begin();
TFTlist[i].setRotation(1);
TFTlist[i].fillScreen(ILI9341_WHITE);
TFTlist[i].drawBitmap(140, 100, logo_stk_bmp, 48,48, ILI9341_BLACK, ILI9341_GRAY);
delay(2000);
TFTlist[i].fillScreen(ILI9341_WHITE);
TFTlist[i].setTextColor(ILI9341_BLACK);
delay(2000);
}
Thanks
Paolo

you need separate reset pins too