#include <Adafruit_GFX.h>
#include <Adafruit_ILI9341.h>
// Define pins for the first display
#define TFT_CS1 10
#define TFT_DC1 9
#define TFT_RST1 8
// Define pins for the second display
#define TFT_CS2 7
#define TFT_DC2 6
#define TFT_RST2 5
// Define pins for the third display
#define TFT_CS3 4
#define TFT_DC3 3
#define TFT_RST3 2
// Create instances for the three displays
Adafruit_ILI9341 tft1 = Adafruit_ILI9341(TFT_CS1, TFT_DC1, TFT_RST1);
Adafruit_ILI9341 tft2 = Adafruit_ILI9341(TFT_CS2, TFT_DC2, TFT_RST2);
Adafruit_ILI9341 tft3 = Adafruit_ILI9341(TFT_CS3, TFT_DC3, TFT_RST3);
void setup() {
// Initialize all three displays
tft1.begin();
tft2.begin();
tft3.begin();
// Set the rotation for all three displays (optional)
tft1.setRotation(1);
tft2.setRotation(1);
tft3.setRotation(1);
// Fill all three screens with black
tft1.fillScreen(ILI9341_BLACK);
tft2.fillScreen(ILI9341_BLACK);
tft3.fillScreen(ILI9341_BLACK);
// Set text color and size for all three displays
tft1.setTextColor(ILI9341_WHITE);
tft1.setTextSize(2);
tft1.setCursor(0, 0);
tft1.print("Hello, World!");
tft2.setTextColor(ILI9341_WHITE);
tft2.setTextSize(2);
tft2.setCursor(0, 0);
tft2.print("Hello, World!");
tft3.setTextColor(ILI9341_WHITE);
tft3.setTextSize(2);
tft3.setCursor(0, 0);
tft3.print("Hello, World!");
}
void loop() {
// Nothing to do in the loop for this simple test
}