Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Touch screen 90 degrees out #16

Open
computinginschools opened this issue Apr 12, 2018 · 4 comments
Open

Touch screen 90 degrees out #16

computinginschools opened this issue Apr 12, 2018 · 4 comments

Comments

@computinginschools
Copy link

I don't know whether this is the right place to ask this but I'm having some trouble with this touch screen (https://www.amazon.co.uk/gp/product/B075JFT9SF) which I want to use with my Raspberry Pi 2 and pi-scan. The touch screen works fine with a normal raspian installation and is calibrated very well however does not work at all with the 'touch screen' version you supplied (I understand this is for the raspberry pi touch screen only) or the mouse version. I have removed the read only permission from the / and /boot mounts and installed the drivers for the screen (https://github.com/goodtft/LCD-show) and the screen resolution is now fine but the touch screen is 90 degrees out - when I press the top right, it shows in the bottom right and when I press on the bottom right it shows in the bottom left etc. I realise this is a very specific issue but could you help at all?

@duerig
Copy link
Contributor

duerig commented Apr 16, 2018

I don't know what the interaction is between the Kivy libraries (this is what is used for the touch-screen UI) and your screen drivers. So I can't help directly. However, if you want to take a vanilla image and install all the pre-requisites for Pi Scan yourself, you can do the following:

  • Set up locale/keyboard stuff (unless you want to leave it as Great Britain keyboard locale)

  • Install these apt-get packages:

python-setuptools python-dev pkg-config python-pip build-essential python-pil
git-core
dbus python-dbus udisks2 exfat-fuse
liblua5.2-0 lua5.2 liblua5.2-dev libusb-dev
build-essential libltdl-dev libusb-dev libexif-dev libpopt-dev libudev-dev pkg-config git
automake autoconf autopoint gettext libtool wget

ldconfig

udev_version=$(udevd --version)

if [ "$udev_version" -ge "201" ]
then
udev_rules=201
elif [ "$udev_version" -ge "175" ]
then
udev_rules=175
elif [ "$udev_version" -ge "136" ]
then
udev_rules=136
else
udev_rules=0.98
fi

  • Install wiringpi

  • Install Kivy dependencies:

libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev
libgl1-mesa-dev libgles2-mesa-dev
libgstreamer1.0-dev
gstreamer1.0-plugins-bad gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly
gstreamer1.0-omx gstreamer1.0-alsa libmtdev1 libmtdev-dev
xclip

  • Install Kivy

apt_file="/etc/apt/sources.list.d/mitako.list"
apt_entry="deb http://archive.mitako.eu/ jessie main"
apt_key="http://archive.mitako.eu/archive-mitako.gpg.key"
apt_cache="/var/lib/apt/lists/archive.mitako.eu_dists_jessie_main_binary-armhf_Packages"

echo "Registering pipaOS repository: $apt_entry"
echo "$apt_entry" | sudo tee $apt_file > /dev/null

echo "Adding repository key $apt_key"
curl -L "$apt_key" | sudo apt-key add -

echo "Refreshing available packages"
apt-get update

apt-get install python2-kivypie

  • Install configuration files. See attached.

files.zip

Now you should be able to play around with the kivy options in .kivy/config.ini (default options are at: https://github.com/Tenrec-Builders/pi-scan/blob/master/config/touch.ini ). The read-only stuff isn't installed either so you don't need to muck around with remounting to modify stuff. But you do need to remember to shutdown cleanly. Once you have figured out the driver/kivy issues, please post here and I may integrate those options back into the main code base.

Best of luck.

@computinginschools
Copy link
Author

First of all, thanks for the comprehensive response! I am a bit of a noob with Linux so I may need to pick your brains about the finer points of the installation. Am I OK doing that on here or via email?

@duerig
Copy link
Contributor

duerig commented Apr 16, 2018 via email

@duerig
Copy link
Contributor

duerig commented May 8, 2018

Just one other thought on this. As a workaround, just rotate the screen and control it with a keyboard. Every button on the interface has a labelled hotkey. So you can do everything you need without actually using the touch screen at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants