When running examples from either library, the code compiles and uploads to the Arduino but nothing is displayed on the screen. The screen is wired to the Arduino based on the UTFT library documentation.
I've also tried writing my own code to see if the touch module works by itself.
#include <UTFT.h>
#include <UTouch.h>
UTFT myGLCD(TFT01_32, 38,39,40,41);
UTouch myTouch(6,5,4,3,2);
int x, y;
int led=9;
int check;
void setup(){
Serial.begin(9600);
pinMode(led,OUTPUT);
}
void loop(){
check=myTouch.dataAvailable();//checks if screen is touched
myTouch.read();//reads touch
x=myTouch.getX();//determines x coordinate
y=myTouch.getY();//determines y coordinate
Serial.print("check=");//prints so I can see results
Serial.println(check);
Serial.print("x=");
Serial.println(x);
Serial.print("y=");
Serial.println(y);
if(check==1){
digitalWrite(led,HIGH);//if screen is touched, turn on led
}
else
digitalWrite(led,LOW);
delay(10);
}
The output to the Serial Monitor remains 0 for all variables even when the screen is touched.
Any help on solving the display or touch issues is greatly appreciated.
I just downloaded the latest version and it is still not working. I even tried rewiring everything multiple times and still nothing. Is downloading the new library the only thing you did to get it to work?
First you must to delete the folder with old version after this copy the new. another dont will be works. Second you must change only one declaration, when you declared number of pin and type your display. After this everythink must works. how is your display?
I got it working. Not exactly what happened but I tried it on a new computer and re downloaded the library. The only thing I can think of is i I didn't properly delete the original library before adding the updated one. Thanks for the help.
I'm also had this problem, but after deleting the old folder with the library from ../MyDocuments end copy new, all works. You must restarting IDE or Windows
connect the module 7 "tft lcd with arduino due, use the library UTFT_DUE and use the example that comes in the library, it works fine until the LCD starts flashing, use different micro usb cable and the problem disappears for a while and reappears, as if reset, anyone can help me to correct the problem?
Thanks for the comment BDinWa, you were right, now I have another problem with the recognition of the buttons and activate a response, somebody can advise me?
HELP - I've just bought a sainsmart 2.8" TFT touch display board and sd shield for my Arduino Due board. Installation as follows:
0 - First of all I uninstalled any previous UTFT library as requested.
1 - After reading the readme file, I put the extracted UTFT folder (from the UTFT V. 2.7.7 file from http://electronics.henningkarlsen.com/) into Arduino Due 'libraries' folder (under Documents folder).
2 - Inside the UTFT folder there is another folder in order to select what kind of environment I have: I selected Arduino(ARM).
3 - Once selected ARM folder I found the Example folder. I selected UTFT_Demo_320x240 folder and un-commented the statement: UTFT myGCLD(CTE28, 25, 26, 27, 28) in order to select my Display board based on ILI9325 controller and and touch XPT2046 controller.
4 - I selected the320x240.ino file to be compiled by Arduino Due IDE. All OK - the program compiles without any error. Note: so it does recognize the UTFT library.
5 - I Finalized and uploaded the compiled program to Arduino Due program USB input port. No errors reported. All OK.
6 - at the end of uploading I Reset the Arduino Due Board as requested. The Display does remain lighted but NO SIGN of ACTIVITY!!!
This UTFT demo 320x240 is the latest available demo...is it possible that it has bugs ...or it is (probably) mine fault?
Thanks for any indication you could give me,
// CTE TFT LCD/SD Shield for Arduino Due
// -------------------------------------
// Uncomment the following line if you are using this shield #define CTE_DUE_SHIELD 1
//
// For this shield: RS=25, WR=26, CS=27, RST=28
I think I stumbled upon it reading one of the UTFT.pdf in the library.
Hi mboroff, yes I did it...but with no results. It seems that there are around several version of this UTFT library. I checked some of them without results even if I found subtle differences!
Just curious, is your display based upon the ILI9325. Mine is the 2.4 based upon the ILI9325 and I used the statement UTFT myGLCD(ITDB24,25,26,27,28); in my code and then everything began to work. Also, I used this link for the UTF libraris utf and utouch
I had similar problems at the beginning, but the white screen is related to this issue: http://forum.arduino.cc/index.php?topic=256771.0
When the DUE is disconnected for some seconds, then reconnected, the program will run and show it on the tft.
By the way: my 7 inch touch tft works via USB (it draws 500mA @ 5V and 100mA @ 3.3V). I'm using it on a USB3.0 port.
Well, I've been able to run properly the 3.2" display using the:
myGLCD(ITDB24,25,26,27,28)
statement: wonderful!!!
The issue does remain for the 2.8" display ...for the moment I've not found a suitable solution.
If anyone interested I can post the relevant (3.2" display) initialization code and link to working libraries.
I tested all the available features touch & calibration included..
RONOTTE:
Well, I've been able to run properly the 3.2" display using the:
myGLCD(ITDB24,25,26,27,28)
statement: wonderful!!!
The issue does remain for the 2.8" display ...for the moment I've not found a suitable solution.
If anyone interested I can post the relevant (3.2" display) initialization code and link to working libraries.
I tested all the available features touch & calibration included..
cooldex:
HI
Can you send me the code and lib link please.
For the official UTFT/UTOUCH libraries go here UTFT Libraries
If you are using the CTE tft shield you need to edit \Arduino\libraries\UTFT\hardware\arm\HW_ARM_defines.h
// CTE TFT LCD/SD Shield for Arduino Due
// -------------------------------------
// Uncomment the following line if you are using this shield
#define CTE_DUE_SHIELD 1
You then use the initialiser UTFT myGLCD(ITDB32S,25,26,27,28);
This is specifically for the SSD1289 controller version of the 3.2" TFT.
The issue I am having is using a Sainsmart 4.3 LCD touch screen and Arduino Mega. I had the calibration working when I received it and only could run the draw demo. The "Button test" did not work using the libraries that came with the unit. Since then I have download the lib's from the Henning webpage. Now I cannot get the calibration right. Now I get different out puts every time I run Calibration and I checked it out in the link which reports it is not right:
Displaytype : ITead Studio - ITDB02-4.3
Your CAL_X : 0x020347EFUL
Your CAL_Y : 0x01F847C3UL
Your CAL_S : 0x0010F1DFUL
Results:
• Orientation is not correct...
• CAL_X data sequence is not correct...
• CAL_Y data sequence is not correct..
I also want my touch screen to work. PLEASE HELP!!