loading

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:

http://www.elabpeers.com/2-4-tft-lcd-touch.html

Step 1: 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????

Step 2: 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!

Step 3: 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.

<p>Nice job there!! </p><p>I just bought two of those and can't wait to try them out! I intend to use it on my RepRap, to visualize/control and work stand alone with the SD slot!</p><p>I was having some trouble to find exatly this exact LCD, with not much success. I guess you just helped me! I'll let you know when it'll be done ;)</p>
I feel happy that this instructable can help you. Your project sounds great and I hope I can see your project soon. : )
<p>Cool! I'd love to do this, looks like a good step toward prototyping mobile devices...</p>
<p>Thanks. I also plan to make something like remote control. Hope I can do it in the future. : )</p>

About This Instructable

2,981views

17favorites

License:

More by Rookie P:My Ninth Project: Robot Arm with Joystick Shield My Eighth Project: Robot Arm with Smart Tank Chassis and Bluetooth My Seventh Project: Robot Arm Set 
Add instructable to: