/*
Simple "Hello World" for ILI9341 LCD
https://wokwi.com/arduino/projects/308024602434470466
*/
#include "SPI.h"
#include "Adafruit_GFX.h"
#include "Adafruit_ILI9341.h"
#define TFT_DC 9
#define TFT_CS 10
#define TFT2_DC 7
#define TFT2_CS 8
#define TFT3_DC 5
#define TFT3_CS 6
#define TFT4_DC 4
#define TFT4_CS 3
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
Adafruit_ILI9341 tft2 = Adafruit_ILI9341(TFT2_CS, TFT2_DC);
Adafruit_ILI9341 tft3 = Adafruit_ILI9341(TFT3_CS, TFT3_DC);
Adafruit_ILI9341 tft4 = Adafruit_ILI9341(TFT4_CS, TFT4_DC);
void setup() {
tft.begin();
tft2.begin();
tft3.begin();
tft4.begin();
tft.setCursor(26, 120);
tft.setTextColor(ILI9341_RED);
tft.setTextSize(3);
tft.println("Hello, TFT!");
tft.setCursor(20, 160);
tft.setTextColor(ILI9341_GREEN);
tft.setTextSize(2);
tft.println("1st I can has colors?");
tft2.setCursor(26, 120);
tft2.setTextColor(ILI9341_RED);
tft2.setTextSize(3);
tft2.println("2nd Hello, TFT!");
tft2.setCursor(20, 160);
tft2.setTextColor(ILI9341_GREEN);
tft2.setTextSize(2);
tft2.println("I can also has colors?");
tft3.setCursor(26, 120);
tft3.setTextColor(ILI9341_RED);
tft3.setTextSize(3);
tft3.println("3rd Hello, TFT!");
tft4.setCursor(20, 160);
tft4.setTextColor(ILI9341_GREEN);
tft4.setTextSize(2);
tft4.println("4th screen?");
}
void loop() { }