We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I have 2 1.4TFT screens wired up to an Arduino board and only one is displaying the graphic. How do i get it to display both at the same time?
Arduino code
#include <Adafruit_GFX.h> // Core graphics library
#include <Adafruit_ST7735.h> // Hardware-specific library
#include <SPI.h>
#define TFT_CS (4, 10)
#define TFT_RST (3, 9)
#define TFT_DC (2, 8)
#define TFT_SCLK (7, 13)
#define TFT_MOSI (5, 11)
Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_MOSI, TFT_SCLK, TFT_RST);
void setup(void) {
tft.initR(INITR_144GREENTAB); // initialize a ST7735S chip, black tab
testdrawrects(ST7735_WHITE);
}
void loop() {
tft.invertDisplay(false);
}
void testdrawrects(uint16_t color) {
tft.fillScreen(ST7735_BLACK);
for (int16_t x=0; x < tft.width(); x+=6) {
tft.drawRect(tft.width()/2 -x/2, tft.height()/2 -x/2 , x, x, color);
}
}
Answers
Since this is an Arduino question and not a Processing question you'd probably have better luck on the Arduino forum:
https://forum.arduino.cc