Skip to main content

Posts

Featured

arduino tft(www.mcufriend.com) module home autoamtion

Here Is the code:  for complete libraries you can  Here


 You can get the 2.4" display from any online store, please feel free to ask any queries.
The output on your display will be similar to the above picture

#include <Adafruit_GFX_AS.h>

#include <TouchScreen.h>
#include <MCUFRIEND_kbv.h>
MCUFRIEND_kbv tft;

#define LCD_CS A3
#define LCD_CD A2
#define LCD_WR A1
#define LCD_RD A0
#define LCD_RESET A4

#define YP A1
#define XM A2
#define YM 7
#define XP 6

TouchScreen ts = TouchScreen(XP, YP, XM, YM, 300);  

#define TS_MINX 20
#define TS_MINY 120
#define TS_MAXX 200
#define TS_MAXY 940

#define  BLACK   0x0000
#define BLUE    0x001F
#define RED     0xF800
#define GREEN   0x07E0
#define CYAN    0x07FF
#define MAGENTA 0xF81F
#define YELLOW  0xFFE0
#define WHITE   0xFFFF


uint16_t g_identifier;
void setup(void) {
  Serial.begin(9600);
  pinMode(13, OUTPUT);
  pinMode(12, OUTPUT);
  tft.reset();
  delay(10);

 g_identifier = tft.readID(); // some times tft.begin(0x9341); will also used but for tft like th…

Latest posts

DIRECT TORQUE CONTROL FOR DOUBLY FED INDUCTION MACHINE-BASED WIND TURBINES UNDER VOLTAGE DIPS AND WITHOUT CROWBAR PROTECTION

Fuzzy controller based FC-TCR System for Flitering purpose

installing Openpilot in CC3D after flashing Cleanflight

How to Change CC3D Flight controller OS

WELCOME