Moving My Second Project: 2.4" TFT Forward
by Rookie P in Circuits > Arduino
3969 Views, 18 Favorites, 0 Comments
Moving My Second Project: 2.4" TFT Forward

Of course I won't be satisfied with turning on the TFT only, now I wanna test the function of touch screen. We need to download UTouch Library and do calibration first before testing.
The link is as follow:
Calibration



Save the folder to Arduino/libraries and restart Arduino software. Go to File > Examples > UTouch > Arduino > UTouch_Calibration and change the model. The controller model is ILI9325D_8. After uploaded the code, an instruction will appear on the screen. Follow the instruction and we can get the new calibration settings. In my case the setting is as follow:
CAL_X 0x01EEC786UL
CAL_Y 0x0224086EUL
CAL_S 0x000EF13FUL
Go to Arduino/libraries/UTouch/UTouchCD.h. Open this file with Word or Notepad and change the setting.
Now open Arduino software and go to File > Examples > UTouch > Arduino > UTouch_ButtonTest, change the model and try...
No respond???? Why????
Troubleshooting


I beg for an answer from google and find what happens actually:
http://forum.arduino.cc/index.php?topic=147762.0
I change the code in UTouch_Calibration as follow:
myGLCD.InitLCD(PORTRAIT);
myTouch.InitTouch(PORTRAIT);
And do the calibration again. The screen is now in portrait. Then try UTouch_Buttontest again, but it fails.
Change the code in UTouch_Calibration again as follow:
#define TOUCH-ORIENTATION LANDSCAPE
myGLCD.InitLCD(LANDSCAPE);
myTouch.InitTouch(LANDSCAPE);
The screen now is in landscape. Do the calibration again and try UTouch_Buttontest......
Wow~~~~ It works now!
Results



Then I try UTouch_QuickDraw and UTouch_QuickPaint, both can be run perfectly~~~
Sometimes it may be quite discouraging when facing a problem and can't figure out a solution, but I feel great when I get it done after trying many times. : D Thanks for watching it. See you.