so I have the correct coordinates for the Ferduino controller.
But it is harder than I thought! I've tested countless libraries now. My board has 480x320 picel labeled
ILI9481 a 3.5 "display
should work with TFT_HX8357 but nothing happens
I can not do it!
The only calibration that works is from MCUFRIEND_kbv
called Touchscreen Calibration Native
Test result:
Code: Select all
cx=172 cy=926 cz=180 LEFT, TOP, Pressure
cx=168 cy=921 cz=201 LEFT, MIDH, Pressure
cx=150 cy=117 cz=592 LEFT, BOT, Pressure
cx=521 cy=940 cz=268 MIDW, TOP, Pressure
cx=152 cy=921 cz=201 MIDW, BOT, Pressure
cx=877 cy=937 cz=420 RT, TOP, Pressure
cx=880 cy=530 cz=535 RT, MIDH, Pressure
cx=884 cy=109 cz=661 RT, BOT, Pressure
MCUFRIEND_kbv ID=0x9486 320 x 480
const int XP=8,XM=A2,YP=A3,YM=9; //320x480 ID=0x9486
const int TS_LEFT=139,TS_RT=903,TS_TOP=946,TS_BOT=370;
PORTRAIT CALIBRATION 320 x 480
x = map(p.x, LEFT=139, RT=903, 0, 320)
y = map(p.y, TOP=946, BOT=370, 0, 480)
Touch Pin Wiring XP=8 XM=A2 YP=A3 YM=9
LANDSCAPE CALIBRATION 480 x 320
x = map(p.y, LEFT=946, RT=370, 0, 480)
y = map(p.x, TOP=903, BOT=139, 0, 320)
The TFT display is plugged directly onto my Arduino Mega
on the pins
A0-A4 GND- 5V- 3.3V reset
PWM 2-PWM12
Properties: //what i've buy
This TFT-LCD screen module with LCD break, SD card and Flash design. So it's a powerful extension module for your project.
Dimension: 3.5 inches
Controller: ILI9481 or ILI9488 driver (default random) //only ILI9481 works but not in UTOUCH
Resolution: 480x320
Data bits: 8 - 16
Interface pin number: 37 pin
Distance: 1 mm
This pin arrangement does not work!
because are not the right one
Code: Select all
// Initialize display
// ------------------
// Set the pins to the correct ones for your development board
// -----------------------------------------------------------
// Standard Arduino Uno/2009 Shield : <display model>,19,18,17,16
// Standard Arduino Mega/Due shield : <display model>,38,39,40,41
// CTE TFT LCD/SD Shield for Arduino Due : <display model>,25,26,27,28
// Teensy 3.x TFT Test Board : <display model>,23,22, 3, 4
// ElecHouse TFT LCD/SD Shield for Arduino Due : <display model>,22,23,31,33
//
// Remember to change the model parameter to suit your display module!
UTFT myGLCD(ILI9481,38,39,40,41); //3.5" TFTLCD for arduino 2560 from mcufriend.com
// Initialize touchscreen
// ----------------------
// Set the pins to the correct ones for your development board
// -----------------------------------------------------------
// Standard Arduino Uno/2009 Shield : 15,10,14, 9, 8
// Standard Arduino Mega/Due shield : 6, 5, 4, 3, 2
// CTE TFT LCD/SD Shield for Arduino Due : 6, 5, 4, 3, 2
// Teensy 3.x TFT Test Board : 26,31,27,28,29
// ElecHouse TFT LCD/SD Shield for Arduino Due : 25,26,27,29,30
//
UTouch myTouch( 6, 5, 4, 3, 2);
In The Touchscreen Calibration Native is only
Code: Select all
#include <Adafruit_GFX.h>
#include <MCUFRIEND_kbv.h>
MCUFRIEND_kbv tft;
In many Sketches the Pins are correct but nothing happens
display stays white
Code: Select all
#define LCD_RST A4
#define LCD_CS A3
#define LCD_RS A2
#define LCD_WR A1
#define LCD_RD A0
#define LCD_D0 8
#define LCD_D1 9
#define LCD_D2 2
#define LCD_D3 3
#define LCD_D4 4
#define LCD_D5 5
#define LCD_D6 6
#define LCD_D7 7
I hope somebody can help me to integrate my display.
I still have a 3.2 "display but I have not worked on it yet.
I would like to first get the 3.5 "display to run