0

2.8" Capacitive Touch (#1983) Touchscreen Mis-calibrated
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: 2.8" Capacitive Touch (#1983) Touchscreen Mis-calibrated

by arnac001 on Fri Dec 29, 2017 2:22 am

In attempting to use the solution posted on 11/10/2017, I am experiencing a problem. The script fails with the following...

[PITFT] Installing Python libraries & Software...
Installing Pre-requisite Software...This may take a few minutes!
./adafruit-pitft-helper2.sh: line 145: warning: command not found
[PITFT] Exiting due to error: Unable to install software


Deeper examination shows the following...

compilation terminated.

error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1


So, attempting to install 'arm-linux-gnueabihf-gcc', I get this...

pi@raspberrypi ~ $ sudo apt-get install arm-linux-gnueabihf-gcc
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package arm-linux-gnueabihf-gcc


Your thoughts? Is that package known under a different name? Would like top restore my cursor movement...


Thank you in advance!
~Christian

arnac001
 
Posts: 1
Joined: Fri Dec 29, 2017 2:17 am

Re: 2.8" Capacitive Touch (#1983) Touchscreen Mis-calibrated

by adafruit2 on Fri Dec 29, 2017 1:23 pm

arnac, what OS and version are you running?

adafruit2
Site Admin
 
Posts: 16792
Joined: Fri Mar 11, 2005 7:36 pm

Re: 2.8" Capacitive Touch (#1983) Touchscreen Mis-calibrated

by kck on Wed Jan 10, 2018 12:26 pm

I was looking at your new version of the scripts. I would request that for scripts like this one that do installs it should be possible to specify all the options on the command line instead of requiring the interactions. This avoids a rather fragile approach of trying to guess and provide the inputs. While I am sure most of the time this script is being run interactively, there are cases like mine where I am trying to make available a complete app installation process where the right choice overall is to invoke your script from within a larger installation script that has already asked (or knows) the answers to your prompts. As things stand I can either copy and edit your script to my needs which leaves it vulnerable to not getting future updates, or I can blindly supply inputs - neither is really a good choice.

Thanks.

kck
 
Posts: 25
Joined: Fri Dec 25, 2015 1:40 pm

Re: 2.8" Capacitive Touch (#1983) Touchscreen Mis-calibrated

by kck on Wed Jan 10, 2018 3:09 pm

It seems that your new script doesn't actually have the necessary transformation matrices for anything other than landscape orientation. Since I need to run my screen in portrait with the USB plugs at the bottom I am left with a correct display when I specify a 0 rotation but with the touch axes wrong. How can I rotate the touch axes? Can you at least describe how you computed the transform matrix so I could perhaps redo that computation for the other rotations? As it is, it seems your script purports to provide support for rotated screens via its questions but does not actually do so.

kck
 
Posts: 25
Joined: Fri Dec 25, 2015 1:40 pm

Re: 2.8" Capacitive Touch (#1983) Touchscreen Mis-calibrated

by adafruit2 on Wed Jan 10, 2018 3:35 pm

kck - please reply with specifics: which OS, which Pi, which screen, how are you testing?

adafruit2
Site Admin
 
Posts: 16792
Joined: Fri Mar 11, 2005 7:36 pm

Re: 2.8" Capacitive Touch (#1983) Touchscreen Mis-calibrated

by kck on Wed Jan 10, 2018 10:59 pm

RPi3 with 35r screen. Installed the November Raspbian.

1. Ran your helper2 script. Selected 35r(4) and rotation 0 (4) which should give me a portrait layout with USB plugs at bottom. Selected N for console on PiTFT and Y for mirroring on HDMI screen. What I get: image on the PiTFT is visually oriented as I expected. However, the image is somewhat horizontally squished (e.g., icons at to that should be round (Wolfram) are ovoid). My actual mouse will move the cursor correctly around the screen. However, touch is wrong. Moving touch top to bottom moves cursor right to left. Top right touch puts cursor in bottom right position. Moving touch right to left move cursor from bottom to top.

Also noted: I don't actually need the screen mirrored to the HDMI. However, in your code only doing that causes you to run raspi-config boot option B4 which is what is needed to bring up a desktop on the PiTFT.

2. New clean install. Ran script selecting 4,4 again. Selected Y for console on PiTFT. Manually then ran raspi-config to select desktop with login (B4). Now I get a desktop on the HDMI monitor but a blank TFT. This seems due to the presence of 99-fbturbo in /usr/share/X11 . . . If I now edit that 99 file to change fb0 to fb1 and reboot I get close to the right result. Desktop on the TFT and touch works correctly in terms of direction. However, calibration really isn't right. As you touch close to an edge of the screen the corresponding cursor position is closer to the center of the screen and in fact you cannot move the cursor to the screen edge with touch (although you can with the mouse). If I just delete the 99... file and boot I get the desktop back on the HDMI. One interesting item here is that again the mouse correctly positions anywhere on the HDMI screen but the touch part of the PiTFT which is, of course, still active shows the same behavior. Touching at the very edge of the (blank) PiTFT moves the cursor only a good ways off the edge of the HDMI screen. E.g., the touch would not be able to get to any of the icons at the top of the screen.

3. New clean install. Ran script with 4,4 again. Selected N for console on PiTFT and N for mirror. Also ran raspi-config after script to select desktop option. Basically same results as version 2. Screen on HDMI until 99,,, edited to use fb1 and cursor directionally correct with touch but same wrong calibration,

I think that's the complete set of possible options and none seem to work correctly to me. Do you need any more info?

Thanks.

kck
 
Posts: 25
Joined: Fri Dec 25, 2015 1:40 pm

Re: 2.8" Capacitive Touch (#1983) Touchscreen Mis-calibrated

by DREAM on Sun Feb 11, 2018 3:25 pm

Has there been an update on 3.5 PiTFT in Portrait and the touchscreen not calibrating correctly? I can't find anything.

I would like to point out (I don't think anyone has said this) that is the TS test mode where you can drag and draw my touchscreen works without issue, but when I am in the desktop mode it does not work correctly. It's like the touchscreen is off by 90 degrees.

DREAM
 
Posts: 24
Joined: Sun Dec 17, 2017 11:07 am

Re: 2.8" Capacitive Touch (#1983) Touchscreen Mis-calibrated

by adafruit2 on Wed Mar 28, 2018 12:25 pm

yes 3.5" resistive is now fully calibrated in all directions - see https://learn.adafruit.com/adafruit-pit ... -install-2

adafruit2
Site Admin
 
Posts: 16792
Joined: Fri Mar 11, 2005 7:36 pm

Please be positive and constructive with your questions and comments.