I am attaching your project. There are some instructions in the "touchcode.cpp" file.
I really do not like the "URTouch.h" library. But many people use it. And it does the bit-bashing of the XPT2046 on digital#2-6 pins.
The "HCTFT_Touch.h" library works more reliably (for me). It bit-bashes the #2-6 pins
The phonecall example shows how you can have a "standard" project and use different Touch libraries to suit your hardware.
Only the FT6206 library is available through the Library Manager.
You should be able to Google for all the other libraries. Download the ZIP from GitHub. (Green button on right of GitHib page). Thin install library from ZIP.
Hi guys
Thought you might be interested in a YouTube video covering a project of mine to build a dash display for my Rally Car using this LCD Library, and it actually works!
You can change the minimum pressure by changing MINPRESSURE in Resistive TouchScreen.
The XPT2046 calculates the pressure. Neither URTouch or HCTFT_Touch have any method to change the threshold.
My finger does not require much pressure. A stylus needs even less pressure.
Incidentally, a Capacitive sensor works nicely with a gentle finger. No response at all to a plastic stylus.
I installed and tested the phonecall sketch, too.
It works fine.
I have only one question: If I install HCTFT_library, the compiler did not recognise HCTFT_touch.h file
Only when I insert into phonecal_universal.ino: #include <cTFT_Touch.h>, then compiler stop to complain.
And it is the same with veter72_universal.ino sketch. I must include #include <URTouch.h> into this sketch, too.
But the skect wokks fine.
And thank you again for your great contribution and help regarding this touch screens.
My apologies. The Arduino IDE scans the INO files for any library #includes.
It searches for the actual header location and adds this particular library to the "build list"
It kludges forward references etc so that you do not need to worry about them.
It treats C and CPP files like regular source files. i.e. it does not do any kludging.
If you add the #include for each library that you might use in the CPP file, the IDE will build everything ok.
The reason that I chose CPP for the conditional code was because the IDE does not handle conditionals very well in INO files.
Hello !!!
Just biiiiiiiig Thank youuuuu !!!
You just saved my day with your library : I've been looking for how to get my screen to work for at least 4 days, on the cliffs of despair and suddenly I saw things on it !!!
Have a good day !
Hey having some trouble with our mcufriend uno display running on a mega2560. When my partner initially tested the library all examples worked fine and he was drawing on the display and everything. After a switch was made to a second mega the display only gives a white screen. Now we can't get anything but a white screen on either mega. The LCD_ID_readreg was not run when the display was working but here is the output when it is run now and it seems to be giving an ID of 0x8080 which is not on your list of ID's.
It is a mcufriend display. The serial monitor wasn't open when it worked so unfortunately we didn't get the ID then. Assuming 0x8080 is not a valid ID? I will put the shield on an uno tonight and report the findings.
I need some help, I bought a 3.5" mcu friends display, and I have some problem.
I have mirrored screen on both axis, and the collors are wierd, I think it inverted, but if I invert the colors, I have still some problem. Like the red and the blue collors are not right.
Can someone help me?
Read Registers on MCUFRIEND UNO shield
controllers either read as single 16-bit
e.g. the ID is at readReg(0)
or as a sequence of 8-bit values
in special locations (first is dummy)
I am not a a PC. It looks like a Himax HX8357-D controller. And you have a very OLD library version.
Goto the Library Manager and upgrade the MCUFRIEND_kbv library.
Please report back with the ID
David.
Edit. I checked on the PC. It is actually a Novatech NT35310. From memory, the first ones that appeared on Ebay were set up for 8080-16 interface. Please post a photo of bad coloured screen from graphictest_kbv sketch.
I suggest that you ask for a refund unless you are prepared to do some SMD soldering.
Read Registers on MCUFRIEND UNO shield
controllers either read as single 16-bit
e.g. the ID is at readReg(0)
or as a sequence of 8-bit values
in special locations (first is dummy)
A user has reported that his SPFD5408 shield has visible scan lines on the display.
Here is a youtube video
Here is another youtube video
Although Ebay vendors often call these 2.4" shields "SPFD5408" very few contain genuine Orise SPFD5408.
Are there any other ID=0x5408 owners with a "bad" display?