Tenrec-Builders / pi-scan

Pi Scan is a simple, robust capture appliance for book scanners. It runs on a Raspberry Pi 2.
BSD 2-Clause "Simplified" License
264 stars 37 forks source link

Touch screen 90 degrees out #16

Open computinginschools opened 6 years ago

computinginschools commented 6 years ago

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 commented 6 years ago

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:

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

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

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

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 commented 6 years ago

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 commented 6 years ago

Probably best to useemail if you want to get into the weeds. You can ask any questions at help at tenrec dot builders.

On Mon, Apr 16, 2018, at 12:35 PM, computinginschools wrote:

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?> — You are receiving this because you commented. Reply to this email directly, view it on GitHub[1], or mute the thread[2].>

Links:

  1. https://github.com/Tenrec-Builders/pi-scan/issues/16#issuecomment-381705539
  2. https://github.com/notifications/unsubscribe-auth/AA1sTJwxvLkou-Ncg9905gqbIQsWVUlCks5tpORpgaJpZM4TSlVi
duerig commented 6 years ago

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.