roger_marin
Published © GPL3+

Tutorial for ILI9341 TFT LCD SD and Arduino MEGA (part 3)

This is the project that makes work the TFT capabilities of the screen plus the LCD itself

AdvancedFull instructions provided4,484
Tutorial for ILI9341 TFT LCD SD and Arduino MEGA (part 3)

Things used in this project

Story

Read more

Schematics

Connections

Connections

Code

Very light TFT code

Arduino
//Screeen
#include <ILI9341_kbv.h>
ILI9341_kbv my_lcd;
#define vali0 0


//TFT Touch Library
#include <LCDWIKI_TOUCH.h>
LCDWIKI_TOUCH my_tft(44,52,50,51,46); //tcs,tclk (sharing with LCD),tdout (MISO) ,tdin (MOSI) ,tirq


void setup()
{

my_lcd.begin();
my_lcd.setRotation(1);// Landscape
my_lcd.fillScreen(TFT_PINK);// set color iitial screen

//Define the values for tft ( rotation,With,Height)
my_tft.TP_Init(1,240,320);

}






void loop(){

my_tft.TP_Scan(0);
if (my_tft.TP_Get_State()&TP_PRES_DOWN)
{
my_lcd.fillScreen(TFT_RED);// set color iitial screen
delay(1000);
my_lcd.fillScreen(TFT_PINK);// set color iitial screen
}
}
No preview (download only).

Credits

roger_marin

roger_marin

6 projects • 13 followers

Comments