adafruit / Adafruit_ILI9341

Library for Adafruit ILI9341 displays
398 stars 278 forks source link

Connect two ILI9341 to same esp #79

Closed pfugazzi closed 2 years ago

pfugazzi commented 2 years ago

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

ladyada commented 2 years ago

you need separate reset pins too