#include <MCUFRIEND_kbv.h>
#include <Adafruit_GFX.h> // Core graphics library
#define LCD_RESET A4 // Can alternately just connect to Arduino's reset pin
#define LCD_CS A3 // Chip Select goes to Analog 3
#define LCD_CD A2 // Command/Data goes to Analog 2
#define LCD_WR A1 // LCD Write goes to Analog 1
#define LCD_RD A0 // LCD Read goes to Analog 0
// Assign human-readable names to some common 16-bit color values:
#define BLACK 0x0000
#define BLUE 0x001F
#define RED 0xF800
#define GREEN 0x07E0
#define CYAN 0x07FF
#define MAGENTA 0xF81F
#define YELLOW 0xFFE0
#define WHITE 0xFFFF
MCUFRIEND_kbv tft;
void setup() {
tft.reset();
tft.begin(0x9486);
tft.setRotation(1);
tft.fillScreen(RED);
tft.fillScreen(GREEN);
tft.fillScreen(BLUE);
tft.fillScreen(BLACK);
delay(1000);
tft.setCursor(80,100);
tft.setTextColor(WHITE);
tft.setTextSize(4);
tft.print("Hello");
tft.setCursor(220,100);
tft.setTextColor(RED);
tft.setTextSize(4);
tft.print("YouTUBE!");
tft.fillRect(80,200, 321, 60, RED);
tft.setCursor(135,215);
tft.setTextColor(WHITE);
tft.setTextSize(4);
tft.print("Subscribe");
tft.setCursor(40,150);
tft.setTextColor(WHITE);
tft.setTextSize(4);
tft.print("SANI EDU TECHNICAL");
tft.drawRect(0,0,480,320, RED);
delay(1000);
}
void loop() {
tft.fillRect(80,200,321,60,BLACK);
delay(1000);
tft.fillRect(80,200,321,60,RED);
tft.setCursor(135,215);
tft.setTextColor(WHITE);
tft.setTextSize(4);
tft.print("Subscribe");
delay(1000);
}
कोई टिप्पणी नहीं:
एक टिप्पणी भेजें