#include "SPI.h"
#include "Adafruit_GFX.h"
#include "Adafruit_ILI9341.h"
//connections
//Display : Arduino
// 3.3V : VCC
// GND : GND
// cs : 10 >>>chip enable pin
// RST : not simulated >>>RST/RES- Reset pin
// D/C : 9 >>>Data/command pin
// MOSI : 11 >>>SPI data (MCU → LCD)
// SCK : 13 >>>SPI clock
// LED : 5V >>>backlight
// MISO : Not connected >>>SPI data (LCD → MCU)
#define TFT_DC 9
#define TFT_CS 10
//creating a display object named "tft"- TFT_CS and TFT_DC are the parameters passed to the constructor
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS,TFT_DC);
void setup() {
// put your setup code here, to run once:
tft.begin();
tft.setCursor(10,0);
tft.setTextColor(ILI9341_WHITE);
tft.setTextSize(3);
tft.println("Hello!");
tft.setCursor(90, 160);
tft.setTextColor(ILI9341_BLUE);
tft.setTextSize(2);
tft.println("Hello");
tft.setCursor(90, 180);
tft.setTextColor(ILI9341_RED);
tft.println("WORLD");
}
void loop() {
// put your main code here, to run repeatedly:
}