Ive made a little arduino weather station and my problem is that i cant find anywhere some touchscreen library,i am using arduino due..everything works fine,i just cant find it...
i would be very happy if someone could give me some hints on that
its the famous mcufriend 2.4 inch tft with sd slot
i managed to make it work on arduino uno,but who needs uno when there is due
and here is what i made with it.
one more question,how to improve refreshing rate of the display,i mean i dont want it to redraw whole screen over and over again,just the digits..although due can handle it nicely..
no its not Utft its some tftlcd library i found on github,the same library that i used to drive the tft with uno..just changed the pins and thats it..now i found something..and its doing something but not exactly what its supposed to do..weird values
Well i have some feeling that i have to hit my display with a rock to work
no just touchscreen is not working properly..works on uno,but its not working on due.
I tried right now utft libraries and nothing
the library i am using for that display is (Adafruit tftlcd library) that part works fine..i mean displaying content is ok.
but touchscreen..i dont know what to say about that one,because only one half worked..
the same adafruit touch library i downloaded with display library,failed to compile
i got something like this.
In file included from C:\Users\molna\AppData\Roaming\Arduino15\packages\arduino\hardware\sam\1.6.4\variants\arduino_due_x/pins_arduino.h:20:0,
from C:\Users\molna\Documents\Arduino\libraries\Touch-Screen-Library-master\TouchScreen.cpp:6:
and a lot more under it
then i tried the same library but its written that its for due..that one compiles just fine..but in serial monitor values are just crazy
#define YP A2 // must be an analog pin, use "An" notation! #define XM A3 // must be an analog pin, use "An" notation! #define YM 8 // can be a digital pin #define XP 9
you guys know a lot more than me..how can i know which pin is which? because on the back of the display,on one side i have LCD-D pins from 0-7
and on the other side i have LCD-rst LCD-cs LCD-rs LCD-wr LCD-rd..and few more pins for sd card reader i dont understand really how can i define something i dont know? sorry,maybe im too stupid for this,but im trying
Majority of LCD (display) libraries are based on UTFT and being "universal" require few settings / modifications.
The basic one is - select processor - AVR ( Uno ) or ARM (Due) or derivatives. Next one is some identification of your LCD ( 2.4 inch xyz brand). You may also need to identify the (connection ) data bus ( SPI, I2C, 8 bits etc.)
The display and touch control "pins" are separate , but you already discovered that.
Most of the "settings" are documented in source code itself, sometime in not to obvious places.
IMHO the main "secret" of UTFT library is that it is coded for SPECIFIC shields , I/O hardware pins, and this is not very well advertised. But IT IS documented!
So RTFM first is my advise to you.
Good luck.
well..i tried more or less all of them..and display is working but touch is not
i think ill have to struggle a little bit with this..or ill never learn anything..something is wrong,and im doing something wrong for sure,just i cant figure out what exactly.
when i switch display to uno..touch is working fine with the adafruit library..
on due..display is working great but touch is not...i managed to make it work somehow..but its working reversed? i have x,y and preassure values..but when i press the display everything stops so..almost ok but reversed