Little problem with two st7735 screens and animated eyes example. #2306
-
Hi, my problem is that the first screen has both eyes on top of each other ( flickering), the second screen has only one eye as intended. Each screen has a different CS pin defined : 15 for screen 1 and 0 for screen two. I also tried this : #include <TFT_eSPI.h> // Hardware-specific library
#include <SPI.h>
TFT_eSPI tft = TFT_eSPI(); // Invoke custom library
#define LargeScreenCS 15
#define SmallScreenCS 0
void setup(void) {
pinMode(LargeScreenCS,OUTPUT); // The CS pins will be outputs
pinMode(SmallScreenCS,OUTPUT);
// enable both screens for the general initialisation, applies to both
digitalWrite(LargeScreenCS,0);
digitalWrite(SmallScreenCS,0);
tft.setRotation(3);
tft.init();
tft.fillScreen(0);
digitalWrite(SmallScreenCS,1); // switch off small screen, leaving just large one active
tft.drawString("Large screen.",0,0);
delay(2000); // wait a couple of secs before writing to small screen, just for dramatic effect!
digitalWrite(SmallScreenCS,0); // enable small screen
digitalWrite(LargeScreenCS,1);
delay(500); // tell large screen to ignore bus
tft.drawString("Small screen.",0,0); // write the text
}
void loop() {} and after 2500ms i end up with "small screen" writtent on both screen. From what i understand for screen one to receive data CS must be low but since it is specifficaly on high and the problem happens also on the animated eyes example the answer must be something else. Any help is appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Just tried with the pin 16 for screen one and everything works. The board was an ESP32 Dev kit C V2 from AZ-Delivery |
Beta Was this translation helpful? Give feedback.
-
I had the same problem, with one screen having two eyes. I found changing the User_Setup.h for the board I am using and commented out the TFT_CS pin line. I let the program "Animated_Eyes_1" define the TFT1_CS pin. This fixed that problem. the board is a Nucleo F401RE and TFT screen are 1.54" ST7789 240x240 from Adafriut. |
Beta Was this translation helpful? Give feedback.
Just tried with the pin 16 for screen one and everything works.
I will mark as solved but i still don't know what was the problem.
The board was an ESP32 Dev kit C V2 from AZ-Delivery