Comments on: Raspberry Pi Touchscreen Calibration and Screen Rotation http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/ Raspberry Pi, Arduino, and DIY Electronics Projects and Tutorials Fri, 20 Apr 2018 22:07:56 +0000 hourly 1 By: EpicLPer http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-2485 Sat, 08 Apr 2017 13:22:09 +0000 http://www.circuitbasics.com/?p=585#comment-2485 Doesn’t appear to work with the Elegoo 3,5″ Touchscreen. The output is fine but only the touch input is 90° rotated it seems and I have no idea how to fix this.

]]>
By: Rafael Galindo http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-2032 Fri, 13 Jan 2017 15:37:42 +0000 http://www.circuitbasics.com/?p=585#comment-2032 Great tutorial, congratulations! However, I can not get out of the clamp at all … ctrl + c does not work

]]>
By: marius budisteanu http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-1848 Thu, 03 Nov 2016 21:52:00 +0000 http://www.circuitbasics.com/?p=585#comment-1848 thanks for the great tutorial

]]>
By: Martin http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-1553 Sun, 14 Aug 2016 22:31:29 +0000 http://www.circuitbasics.com/?p=585#comment-1553 try using another entry. see the other entries in folder dev/input/. I needed to use “event2” instead of “event0” as written here. just try…

]]>
By: FedyfaustoFedyfausto http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-1423 Sat, 16 Jul 2016 11:48:45 +0000 http://www.circuitbasics.com/?p=585#comment-1423 After poweroff the screen remain white how ca i fix that?

]]>
By: Ralph http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-1358 Wed, 29 Jun 2016 19:37:04 +0000 http://www.circuitbasics.com/?p=585#comment-1358 Hi Thor,

I am having the exact same problem right now. Googling internet around all day and finally was led to your post… I am wondering if you have figured out how to do it already. Please let me know!! much appreciated

]]>
By: pdpro http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-1092 Fri, 18 Mar 2016 03:31:52 +0000 http://www.circuitbasics.com/?p=585#comment-1092 Thanks, I can see the output of buttons now. Now it would be easy to develop some applications.

]]>
By: Eugene http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-1063 Tue, 08 Mar 2016 19:18:52 +0000 http://www.circuitbasics.com/?p=585#comment-1063 You have my deepest gratitude! I spent whole day trying to adjust the cursor movements for 270 degrees screen rotation. Finally I found your post and it made my day. (I am using latest Pi OS as of March 2016 with the proper 7″ screen).

]]>
By: obrun http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-1014 Sat, 20 Feb 2016 05:11:50 +0000 http://www.circuitbasics.com/?p=585#comment-1014 Even better do it by-id which gives even clearer names. In my case:
sudo TSLIB_TSDEVICE=/dev/input/by-id/usb-eGalax_Inc._USB_TouchController-event-if00 TSLIB_FBDEVICE=/dev/fb0 ts_calibrate

]]>
By: clement http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-966 Sat, 06 Feb 2016 12:34:11 +0000 http://www.circuitbasics.com/?p=585#comment-966 Hello i have a waveshare 32b v4 and the touchscreen doesn’t work at all. ts_calibrate can’t open file ts_open and i have no touchscreen file in /dev

]]>
By: Dru http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-961 Thu, 04 Feb 2016 05:02:01 +0000 http://www.circuitbasics.com/?p=585#comment-961 i have an osoyoo 3.5 inch touchscreen. it came with some raspbian version there (the only one that works with it) but the colors are like inverted… some help would be greatly apreciated

]]>
By: Joseph http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-861 Thu, 17 Dec 2015 06:50:35 +0000 http://www.circuitbasics.com/?p=585#comment-861 Can these same instructions be used for waveshare 3.5inch LCD spotpear.

]]>
By: vatipaa http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-860 Mon, 14 Dec 2015 20:00:52 +0000 http://www.circuitbasics.com/?p=585#comment-860 To change X axis behavior I created new section in 99-fbturbo.conf:

Section “InputClass”
Identifier “VaihdaXY”
MatchProduct “ADS7846 Touchscreen”
Option “InvertX” “1”
EndSection

Works like a charm. Otherwise I followed the excellent instructions. Thanks!
BTW “VaihdaXY” can be anything, like SwitchXY.

]]>
By: Gopakumar http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-783 Tue, 17 Nov 2015 08:15:49 +0000 http://www.circuitbasics.com/?p=585#comment-783 hai..
i am using raspberry pi 2 and waveshare 3.2 inch lcd. its all working fine.
but the X axis is inverted after booting.
Requesting you to provide necessary steps…
Thanks in advance….

]]>
By: alpayo http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-764 Sat, 24 Oct 2015 12:13:16 +0000 http://www.circuitbasics.com/?p=585#comment-764 Hi,
I am using the same LCD and followed your tutorial. Have your tested the guide lately? Are you certain that it works? I see the boot messages on console but I get white screen as GUI starts.

Below is the /var/log/messages after reboot. Could you please help?
Oct 16 17:38:48 spare kernel: [ 11.653936] fbtft: module is from the staging directory, the quality is unknown, you have been warned.
Oct 16 17:38:48 spare kernel: [ 11.691425] fbtft_device: module is from the staging directory, the quality is unknown, you have been warned.
Oct 16 17:38:48 spare kernel: [ 11.722872] fbtft_device: SPI devices registered:
Oct 16 17:38:48 spare kernel: [ 11.732559] fbtft_device: spidev spi0.0 500kHz 8 bits mode=0x00
Oct 16 17:38:48 spare kernel: [ 11.741603] fbtft_device: spidev spi0.1 500kHz 8 bits mode=0x00
Oct 16 17:38:48 spare kernel: [ 11.750250] fbtft_device: ‘fb’ Platform devices registered:
Oct 16 17:38:48 spare kernel: [ 11.758218] fbtft_device: soc:fb id=-1 pdata? no
Oct 16 17:38:48 spare kernel: [ 11.765443] fbtft_device: Deleting spi0.0
Oct 16 17:38:48 spare kernel: [ 11.774787] fbtft_device: GPIOS used by ‘waveshare32b’:
Oct 16 17:38:48 spare kernel: [ 11.797819] fbtft_device: ‘dc’ = GPIO22
Oct 16 17:38:48 spare kernel: [ 11.804016] fbtft_device: ‘reset’ = GPIO27
Oct 16 17:38:48 spare kernel: [ 11.817202] fbtft_device: SPI devices registered:
Oct 16 17:38:48 spare kernel: [ 11.824518] fb_ili9340: module is from the staging directory, the quality is unknown, you have been warned.
Oct 16 17:38:48 spare kernel: [ 11.838570] fbtft_device: spidev spi0.1 500kHz 8 bits mode=0x00
Oct 16 17:38:48 spare kernel: [ 11.847045] fbtft_device: fb_ili9340 spi0.0 48000kHz 8 bits mode=0x00
Oct 16 17:38:48 spare kernel: [ 12.544859] graphics fb1: fb_ili9340 frame buffer, 320×240, 150 KiB video memory, 4 KiB DMA buffer memory, fps=50, spi0.0 at 48 MHz
Oct 16 17:38:48 spare kernel: [ 15.047752] random: nonblocking pool is initialized
Oct 16 17:38:48 spare kernel: [ 21.773644] smsc95xx 1-1.1:1.0 eth0: hardware isn’t capable of remote wakeup
Oct 16 17:38:48 spare kernel: [ 23.233722] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0x4DE1
Oct 16 17:38:48 spare kernel: [ 26.731487] cfg80211: Calling CRDA to update world regulatory domain
Oct 16 17:38:51 spare kernel: [ 31.201111] Adding 102396k swap on /var/swap. Priority:-1 extents:2 across:2134012k SSFS

]]>
By: zinenine http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-725 Sun, 13 Sep 2015 04:21:04 +0000 http://www.circuitbasics.com/?p=585#comment-725 Resolved…

]]>
By: zinenine http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-724 Sun, 13 Sep 2015 04:19:54 +0000 http://www.circuitbasics.com/?p=585#comment-724 oh, my god
I was looking for a solution
Your reply is correct
thank you..!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

]]>
By: zinenine http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-721 Fri, 11 Sep 2015 11:03:25 +0000 http://www.circuitbasics.com/?p=585#comment-721 Hi, I am a Korean
Found through Google Translator
This guide is perfect
I did as guide
but, The problem occurred to me
This comes as a vertical direction of the touch
I am being used to screen 270 degrees.
Whether touch is rotated 270.
I do not know.Please teach me.

]]>
By: james http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-699 Wed, 26 Aug 2015 15:37:17 +0000 http://www.circuitbasics.com/?p=585#comment-699 after stage 3, when rebooted the screen would only work if also connected to hdmi. Any solutions?

]]>
By: Geir http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-666 Wed, 05 Aug 2015 14:16:59 +0000 http://www.circuitbasics.com/?p=585#comment-666 Thanks for all help on this page and some of the comments here. My system consists of RPi model B with 1GByte RAM, 8GByte Micro-SD card, Linux raspberrypi 4.0.7-v7+, WaveShare SpotPear 3.2 inch LCD (V3). Screen/touch rotation as well as calibration works fine now. The keys are working fine too 🙂 This page with some of the comments that followed was of particular great help for getting the 3.2 inch LCD working: http://www.circuitbasics.com/setup-lcd-touchscreen-raspberry-pi/

]]>
By: Geir http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-665 Wed, 05 Aug 2015 13:03:09 +0000 http://www.circuitbasics.com/?p=585#comment-665 Thanks Thor, your instructions adding code on the /usr/share/X11/xorg.conf.d/99-fbturbo.conf fixed problem I had with inverted x-axis on my RPi model B + WaveShare SpotPear 3.2 inch LCD (V3).

]]>
By: Planky http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-647 Mon, 20 Jul 2015 14:20:38 +0000 http://www.circuitbasics.com/?p=585#comment-647 Found the fix, check out https://www.raspberrypi.org/forums/viewtopic.php?t=48967

Had to add Option “InvertY” “true” to the touchscreen input class.

]]>
By: Planky http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-646 Mon, 20 Jul 2015 13:45:03 +0000 http://www.circuitbasics.com/?p=585#comment-646 Found some details on http://blog.rot13.org/2013/12/touch-screen-configuration-using-xinput.html which is getting me further.

Using ‘xinput list’, I found my touchscreen has an ID of 6. Then using ‘xinput list-props 6’ (6 being the id I found before, I looked for “Evdev Axis Inversion” and noted the ID (239 in my case).

I then ran ‘xinput set-prop 6 239 1 0’, and the X axis started behaving (moving stylus to the left moved the cursor to the left). I put this in xinitrc, but again it seems to ignore this file when starting X.

]]>
By: Planky http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-645 Mon, 20 Jul 2015 13:18:38 +0000 http://www.circuitbasics.com/?p=585#comment-645 Having the exact same issue as NoBadDaysInSD. ts_calibrate and ts_test work fine. But X axis is still inverted after exiting/rebooting. Changing xinitrc seems to have absolutely no effect. Waveshare V4 on RP2.

]]>
By: NoBadDaysInSD http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-601 Thu, 18 Jun 2015 04:20:07 +0000 http://www.circuitbasics.com/?p=585#comment-601 Great tutorial.
So far it worked out well.
Just running into following situation.

When moving finger to the right, cursor goes left. Up/down works fine.
Tried different combinations in the
DISPLAY=:0 xinput –set-prop ‘ADS7846 Touchscreen’ ‘Evdev Axis Inversion’ 1 0

ts_test works perfectly fine. Drawing and dragging just works fine.

Any suggestions appreciated

]]>
By: vinu http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-596 Sun, 14 Jun 2015 03:06:38 +0000 http://www.circuitbasics.com/?p=585#comment-596 unable to calibrate .

root@raspberrypi:/home/pi# apt-get install libts-bin
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following NEW packages will be installed:
libts-bin
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/33.1 kB of archives.
After this operation, 119 kB of additional disk space will be used.
Selecting previously unselected package libts-bin.
(Reading database … 77866 files and directories currently installed.)
Unpacking libts-bin (from …/libts-bin_1.0-11_armhf.deb) …
Processing triggers for man-db …
Setting up libts-bin (1.0-11) …
root@raspberrypi:/home/pi# export TSLIB_TSDEVICE=/dev/input/event0
root@raspberrypi:/home/pi# export TSLIB_FBDEVICE=/dev/fb1
root@raspberrypi:/home/pi# ts_calibrate
ts_open: No such file or directory

]]>
By: eder http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-506 Mon, 01 Jun 2015 00:33:56 +0000 http://www.circuitbasics.com/?p=585#comment-506 i did all the steps everything is working however im using retro pie and everything boots and load but the UI only shows in hdmi mode not on my tft 3.2 screen ….by the way i have the same screen

]]>
By: jorge http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-340 Thu, 14 May 2015 01:55:10 +0000 http://www.circuitbasics.com/?p=585#comment-340 es para raspberry PI2
https://yadi.sk/d/MqEusRptgZYsC

]]>
By: jorge http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-339 Thu, 14 May 2015 01:52:16 +0000 http://www.circuitbasics.com/?p=585#comment-339 amigos con esta imagen funcion mi lcd 3.2” washared spotpear V4
https://yadi.sk/d/MqEusRptgZYsC

]]>
By: Jimc http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-173 Wed, 08 Apr 2015 11:15:44 +0000 http://www.circuitbasics.com/?p=585#comment-173 Hi,

Well, the good news is that everything is now working very nicely. The bad news is that I can’t account for it. It may well have been down to a complete unplug and replug, although I originally thought that it may have been associated with having a blank line at the end of my /boot/cmdline.txt file. But I cannot reproduce the problem at all now, so I can’t be more help, I’m afraid.

Apart from that little wobble, I’ve found this to be an excellent article, and very clear and straightforward to follow. All I need to do now is to finish implementing my menu system using Pi4J to handle the buttons.

Many thanks!

]]>
By: Circuit Basics http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-166 Sun, 05 Apr 2015 01:17:39 +0000 http://www.circuitbasics.com/?p=585#comment-166 Hi Thor,

I have noticed that the calibration only works specifically for X. I think that may be the source of some peoples problems with it. Unfortunately I’m not sure how to calibrate it with a framebuffer graphics system, maybe someone else here knows?

]]>
By: Thor http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-163 Fri, 03 Apr 2015 21:13:37 +0000 http://www.circuitbasics.com/?p=585#comment-163 Also…. The only thing I need is to use this display with touch screen with a python environment with framebuffer graphic system and not X. So at the moment I never found the right way to use this display/touch as I need. The touchscreen work fine and it is calibrated in a X mode, but when I’m out from X in framebuffer, there are no way to get the touch calibrated ad tried any solution to fix it without success… So for the moment I continue to search a good solution.

]]>
By: Thor http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-162 Fri, 03 Apr 2015 20:18:16 +0000 http://www.circuitbasics.com/?p=585#comment-162 distort = distro damn corrector….

]]>
By: Thor http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-161 Fri, 03 Apr 2015 20:16:55 +0000 http://www.circuitbasics.com/?p=585#comment-161 Narco, the process step by step is really long, so, my first installation is a subsequences of many tries and I don’t know what i exactly do. So I followed this tutorial some weeks ago, and all go right. So with last update of kernel, some change was needed to make the touch working again. So I restarted from scratch using a rasbpian customized image from here: http://www.amazon.com/SainSmart-Module-Screen-Display-Raspberry/dp/B00OPZNI3M
This install a really clean and fast distort, with full working display and touch, at the first try, without do nothing.
I suggest to start with this image, then personalize it as you like.
Ciao

]]>
By: Narco http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-159 Thu, 02 Apr 2015 23:27:09 +0000 http://www.circuitbasics.com/?p=585#comment-159 Thor could you share your complete configuration and step by step guide when something different from circuitbasics one, I’ve sku tft lcd 3.2 (v4.1) too and i’ve no success making it working 🙁

]]>
By: Thor http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-156 Mon, 30 Mar 2015 22:22:15 +0000 http://www.circuitbasics.com/?p=585#comment-156 I have a new problem..

Touchscreen now is working, and if I use in GUI X environment it track correctly. So if I start in console mode, and run a python pygame script that use touchscreen, it result totally uncalibrated and with Y axes inverted.
I tried every procedure for calibrate the touch, but all seems related to X environment, but the python pygame script do not use X environment. So Where are the calibration info for non X env ?

off course I added these lines on my python pygame scripts in order to make touchscreen working

os.environ[“SDL_FBDEV”] = “/dev/fb1”
os.environ[“SDL_MOUSEDEV”] = “/dev/input/touchscreen”
os.environ[“SDL_MOUSEDRV”] = “TSLIB”

Also I’m unable to override calibration info that I don’t know where are.

editing these files have not any effect, due X do not star at all.
/usr/share/X11/xorg.conf.d/99-fbturbo.conf
/usr/share/X11/xorg.conf.d/99-calibration.conf
/usr/share/X11/xorg.conf.d/10-evdev.conf

Someone have a ideas to suggest ?

Thanks

]]>
By: Thor http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-151 Sun, 29 Mar 2015 07:43:32 +0000 http://www.circuitbasics.com/?p=585#comment-151 OK I got it working again:

1) sudo cp /boot/overlays/ads7846-overlay.dtb /boot/
2) remove from etc/modules the line ads7846_device model=7846 cs=1 gpio_pendown=17 speed=1000000 keep_vref_on=1 swap_xy=0 pressure_max=255 x_plate_ohms=60 x_min=200 x_max=3900 y_min=200 y_max=3900
and replace with only ads7846
3) sudo nano /boot/config.txt
add
device_tree=bcm2709-rpi-2-b.dtb # for RSPI 2 Ver.b (use proper vcmxxx according with your version of rpi check in boot folder to see the dub available)
dtparam=spi=on
dtparam=i2c=on
dtparam=i2c1=on
dtparam=i2c_arm=on

device_tree=ads7846-overlay.dtb
dtoverlay=ads7846,cs=1, penirq=17, speed=1000000, swapxy=0, pmax=255, xohms=60, xmin=200, xmax=3900, ymin=200, ymax=3900

After this touch screen return working again with new kernel

]]>
By: Thor http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-149 Sat, 28 Mar 2015 20:46:14 +0000 http://www.circuitbasics.com/?p=585#comment-149 I also added these lines in /boot/config.txt

device_tree=ads7846-overlay.dtb
dtoverlay=ads7846,cs=1, penirq=17, speed=1000000, swapxy=0, pmax=255, xohms=60, xmin=200, xmax=3900, ymin=200, ymax=3900

but the touchscreen doesn’t work anymore.

]]>
By: Thor http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-148 Sat, 28 Mar 2015 19:58:00 +0000 http://www.circuitbasics.com/?p=585#comment-148 NEWS !!!

on the 2015-03-27 the notro firmware was changed

Changelog

FBTFT support is now in raspberrypi/linux. This release only adds SPI DMA support on top of that.
pitft overlay changed name to pitft28-resistive
These modules are no longer present:
gpio_keys_device – DT overlay example
ads7846_device – Use ads7846 DT overlay instead. See /boot/overlays/README
gpio_mouse_device
stmpe_device
gpio_backlight_device
rpi_power_switch
spi-config

In particular you can see this line:
ads7846_device – Use ads7846 DT overlay instead
That means that the touchscreen no longer works with the current exposed procedure.

According to what noticed, dtoverlay was needed.

So i tried to make this change, editing the etc/modules file and replaced the line

ads7846_device model=7846 cs=1 gpio_pendown=17 speed=1000000 keep_vref_on=1 swap_xy=0 pressure_max=255 x_plate_ohms=60 x_min=200 x_max=3900 y_min=200 y_max=3900

with

dtoverlay=ads7846,cs=1, penirq=17, speed=1000000, swapxy=0, pmax=255, xohms=60, xmin=200, xmax=3900, ymin=200, ymax=3900

But seems there are not life signal of the touchscreen. As I can see typing ls /dev/input where I can’t see the evdevx device.

I’m not enough smart to find a clue, there are someone can help ?

Thanks

]]>
By: Pribhat http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-146 Sat, 28 Mar 2015 18:26:07 +0000 http://www.circuitbasics.com/?p=585#comment-146 Hi

I am also using the same waveshare 3.2″ touchscreen as you are and I followed all the instructions clearly.
I’ve successfully enabled the SPI display output and rotated the screen to my liking, thanks to your instructions and kudos for the same.
But, i’m facing two issues:

First, my touchscreen wont recognise touch. When I run ts_calibrate the display flashes with the crosshair screen for a very very brief time and on the terminal it reads:

root@raspberrypi:/home/pi# export TSLIB_TSDEVICE=/dev/input/event0
root@raspberrypi:/home/pi# export TSLIB_FBDEVICE=/dev/fb1
root@raspberrypi:/home/pi# ts_calibrate
xres = 320, yres = 240
selected device is not a touchscreen I understand
Took 1 samples…
Top left : X = -1225595876 Y = -1093006084
Took 1 samples…
Top right : X = -1225595876 Y = -1093006084
Took 1 samples…
Bot right : X = -1225595876 Y = -1093006084
Took 1 samples…
Bot left : X = -1225595876 Y = -1093006084
Took 1 samples…
Center : X = -1225595876 Y = -1093006084
-0.265507 -0.309292 0.346811
0.462141 -0.258298 0.289631
Calibration constants: -17400 -20269 22728 30286 -16927 18981 65536
root@raspberrypi:/home/pi#

Second, and the reason why I went to all the trouble, is the omxplayer wont play videos. I can only get the audio via the jack.

Can you please help me out here?

Thanks!

]]>
By: Chris http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-145 Sat, 28 Mar 2015 17:15:05 +0000 http://www.circuitbasics.com/?p=585#comment-145 As an example this should get the 3 buttons working for anyone who needed them. Create a file by typing sudo nano /home/pi/switch.py enter the below text, save and exit, then enter sudo python switch.py to test. If working then add “python /home/pi/switch.py” without quotes to bottom of file before exit 0 to have it at startup….This is working on my Pi2 with 2015-02-16-raspbian-wheezy image.

import RPi.GPIO as GPIO
import time
import os

GPIO.setmode(GPIO.BOARD)

GPIO.setup(12, GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(16, GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(18, GPIO.IN, pull_up_down=GPIO.PUD_UP)

while True:
if GPIO.input(12) == False:
print(‘Button 1’)
os.system(“sudo shutdown -h now”)
time.sleep(0.2)
if GPIO.input(16) == False:
print(‘Button 2’)
time.sleep(0.2)
if GPIO.input(18) == False:
print(‘Button 3’)
time.sleep(0.2)
GPIO.cleanup()

]]>
By: Thor http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-142 Tue, 24 Mar 2015 21:21:05 +0000 http://www.circuitbasics.com/?p=585#comment-142 I fixed the inverted Y axes on touch screen.

downloaded the needed module with these commands:

sudo pip install evdev
sudo pip install xinput

I added this code on the /usr/share/X11/xorg.conf.d/99-fbturbo.conf

Section “InputClass”
Identifier “evdev touchscreen catchall”
MatchIsTouchscreen “on”
MatchDevicePath “/dev/input/event*”
Driver “evdev”
Option “InvertY” “true”
Option “GrabDevice” “True”
EndSection

Also in the section you can add these lines in case you need:

Option “SwapAxes” “True”
Option “InvertX” “true”

Thanks

Bye

]]>
By: Thor http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-141 Tue, 24 Mar 2015 08:40:56 +0000 http://www.circuitbasics.com/?p=585#comment-141 I installed on my TFTLCD32 (V4.1) got from BangGood and work perfectly. I set the rotation to 270 (Power connector UP) but I have ever the touch screen Y axes inverted. I tried all combination explained. (DISPLAY=:0 xinput –set-prop ‘ADS7846 Touchscreen’ ‘Evdev Axis Inversion’ 1 0) or 0 1 this in particular seems have not any effects. Someone can help ?
Also is possible to reduce the icon size on raspbian ?

Thanks in advance

]]>
By: circuitbasics@gmail.com http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-127 Thu, 19 Mar 2015 01:54:54 +0000 http://www.circuitbasics.com/?p=585#comment-127 Hi Jimc,

I just went through the installation on a Raspberry Pi 2 Model B, using the Waveshare 3.2″ LCD touchscreen and the 2-16-15 release of Raspbian. Everything worked ok, however I noticed that sometimes I would need to poweroff and unplug instead of just reboot for the setting changes to take effect. I’m wondering, what screen are you using, and what version of Raspbian?

]]>
By: Jimc http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-125 Mon, 16 Mar 2015 11:23:04 +0000 http://www.circuitbasics.com/?p=585#comment-125 Very clear and straightforward tutorial – many thanks.
But – there’s always a ‘but’ – I’m getting the same problem as a couple of other folks, where I am not able to change the screen orientation. I have changed the value of fbtft_device.rotate to 90 and restarted, but the orientation doesn’t change. I wonder whether there has been a change in a recent OS update?

]]>
By: Vlady http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-123 Thu, 12 Mar 2015 17:01:51 +0000 http://www.circuitbasics.com/?p=585#comment-123 did you copy the whole line. I make the same mistake at first and then copy the line by selecting all.

]]>
By: Dewey http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-121 Wed, 11 Mar 2015 23:13:51 +0000 http://www.circuitbasics.com/?p=585#comment-121 Great Tutorial!!

]]>
By: Stéphan http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-120 Tue, 10 Mar 2015 20:23:00 +0000 http://www.circuitbasics.com/?p=585#comment-120 Hi,
I’m using the waveshare 3.2 V3 on a Raspberry 2 b. The first part of the installation works fine. Screen rotation doesn’t work but the mouse movement when is not working ?

]]>
By: Sven http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-118 Mon, 09 Mar 2015 12:29:56 +0000 http://www.circuitbasics.com/?p=585#comment-118 Hi,
I’m using the waveshare 3.2 V3 on a Raspberry 2 b. The first part of the installation works fine. And I can also change the mouse movement when I follow these instructions. But the screen rotation doesn’t work. I’ve no idea how to fix that. Any ideas?

]]>
By: corey http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-114 Sat, 07 Mar 2015 21:46:04 +0000 http://www.circuitbasics.com/?p=585#comment-114 i tried the first command… the file doesnt have the same stuff on the pi2 so there isnt even a place to change the zero and ninety…

]]>