Arduino Forum

Using Arduino => Displays => Topic started by: Docedison on Dec 02, 2012, 05:59 pm

Title: New UTFT Lib
Post by: Docedison on Dec 02, 2012, 05:59 pm
In advance of Henning Karlsen's announcement of a new touch library for the Itead 3.2 320 X 240 Displays.
I had the good fortune to find, download  and install the library and samples and I am truly impressed.  The keypad displays 2 rows of 5 numeric buttons and an enter and clear button make a nice alternative to the... Usual. The sample sketches compiled without issue and worked faultlessly. The Keypad sketch looks easily modifiable to any required specifications by the 'controlled' portion of the main sketch. In short stuff that does what it is supposed to.

Bob
Title: Re: New UTFT Lib
Post by: svalls on Dec 02, 2012, 08:03 pm
Any 7" display suggested for this library?
Title: Re: New UTFT Lib
Post by: Docedison on Dec 03, 2012, 12:09 am
5 inch is the largest, although If you know the controller chip, UTFT might drive the display. There are no provisions for a 7" touch screen library. Try the UTFT lib for different display's. My comment's were strictly devoted to the touch screen library and it's real ease of use.

Bob
Title: Re: New UTFT Lib
Post by: svalls on Dec 03, 2012, 09:04 am
Thanks, I'll try to find a 7".
Title: Re: New UTFT Lib
Post by: JohnHoward on Dec 05, 2012, 04:19 am
Link to where you found this?  Please?
Title: Re: New UTFT Lib
Post by: Docedison on Dec 06, 2012, 05:10 am
@ the link request, what did Google say about UTFT?

Boob the Noob
Title: Re: New UTFT Lib
Post by: guix on Dec 06, 2012, 10:51 am
So it's not UTFT that has been updated, but a new library called Utouch, which replace ITDB Touch.

I've tried it and didn't notice much difference but one problem: I ran the calibration program, used a stylus and took my time to press at the center of those squares, and once the resulting values were added to that header file, the touchscreen was not accurate at all, while the previous version gave good results. I made sure the orientation was correct, re-ran the calibration twice, same problem. So I'm using the default values since they are hopefully more accurate!
Title: Re: New UTFT Lib
Post by: Docedison on Dec 06, 2012, 11:27 am
Mine worked and seemed to work after... I did the calibration, But I don't remember If I re compiled and reloaded the sketch... After.
I've been really pleased with the whole package..., Fonts, Icons and the UTFT package as well, Surprisingly one of the very few... with an instruction manual that is accurate too.
I bought 2 (A Really Long Story) 4D Systems 3.2 PT SGC displays and found these to be easier to use (Itead Studios TFT_320QUT) than the really expensive ($80.00 US) 4D things.
I can buy a display and shield for less than $30.00 US ($21 - $25.00 US) and have about 50% of the 4D Systems displays...
The really essential parts. The rest is really nice too but not required in anything I'm doing in the near future.

Bob
Title: Re: New UTFT Lib
Post by: Magicj on Dec 06, 2012, 01:13 pm
Has anyone successfully used the calibration sketch on a 3.2WD screen  - I am having no luck in getting it to work correctly. When I run subsequently run the Quick Draw example I get a mirror image on the long axis.
Title: Re: New UTFT Lib
Post by: guix on Dec 06, 2012, 02:17 pm

Has anyone successfully used the calibration sketch on a 3.2WD screen  - I am having no luck in getting it to work correctly. When I run subsequently run the Quick Draw example I get a mirror image on the long axis.


Orientation problem, easy to fix by changing the orientation value to fit your needs :)
Title: Re: New UTFT Lib
Post by: Magicj on Dec 06, 2012, 10:35 pm


Has anyone successfully used the calibration sketch on a 3.2WD screen  - I am having no luck in getting it to work correctly. When I run subsequently run the Quick Draw example I get a mirror image on the long axis.


Orientation problem, easy to fix by changing the orientation value to fit your needs :)


I gather you mean to change the orientation of the screen and/or touch panel to either Portrait or Landscape in the initialisation??

I have tried all different combinations with different/ but still incorrect, results.
Title: Re: New UTFT Lib
Post by: Docedison on Dec 07, 2012, 06:59 am
The ITDB802 Touch Lib initializes the touch orientation to portrait and the UTFT Lib initializes to landscape as defaults
From the UTFT Header file:
#define PORTRAIT 0
#define LANDSCAPE 1   // this is the default mode, set it to 0 for Portrait
The same applies to the ITDB802 Touch
From the touch header file:
InitTouch(byte orientation = PORTRAIT);  //Set it to 1 for landscape...
So flipping the value to 0 of either the touch init or the UTFT init will give correct results.
Touch init(1) is Landscape with the default UTFTinit
UTFTinit(0)is Portrait with the default Touchinit.I do hope this helps.

Bob
Title: Re: New UTFT Lib
Post by: Markus_L811 on Dec 17, 2012, 04:34 pm



Has anyone successfully used the calibration sketch on a 3.2WD screen  - I am having no luck in getting it to work correctly. When I run subsequently run the Quick Draw example I get a mirror image on the long axis.


Orientation problem, easy to fix by changing the orientation value to fit your needs :)


I gather you mean to change the orientation of the screen and/or touch panel to either Portrait or Landscape in the initialisation??

I have tried all different combinations with different/ but still incorrect, results.

You need to do the calibration Sketch first and edit then the UTouchCD.h

or alternativ test mine I have the same panel.

Markus
Title: Re: New UTFT Lib
Post by: Magicj on Dec 18, 2012, 10:55 am
I am happy to report that I now have this working.

Thanks to Bob and Markus for your reply's.

I had been working with the previous Touch library for some time and assumed that the new calibration was meant to be run in Portrait mode, for both Touch and Screen.

Henning kindly provided the results for his 3.2WD screen which worked perfectly which left only one option - I was doing something wrong  :smiley-red:. After some more experimentation I have found that the Calibration sketch works with the LCD in Landscape mode and the Touch in Portrait mode.

Now to start writing some sketches.

Have a great Christmas everyone.
Title: Re: New UTFT Lib
Post by: doc_norway on Dec 22, 2012, 03:16 am

...the Calibration sketch works with the LCD in Landscape mode and the Touch in Portrait mode.


This is not entirely correct. The LCD always operates in Landscape mode in the calibration, but the touch screen operates in its own default orientation. For most display modules this will be Portrait, but not all modules are the same. This is described in the UTouch manual, and the correct orientation for all officially supported modules are also listed in the documentation.

/Henning
Title: Re: New UTFT Lib
Post by: Magicj on Dec 22, 2012, 12:49 pm
Thanks for the clarification Henning - I should have mentioned that my results were for my 3.2WD screen.

Cheers