Integrating custom config files for other Displays (It was "Touchscreen waveshare")


#1

Is there a way someone can show me or tell me how to use my touchscreen on my waveshare 3.2 clone


Replace the resistive against a capacitive touch?
#2

Working for me with following setup:
Select WaveShare32B in webconf.
In /boot/config.txt disable the ads7846 driver:
#dtoverlay=ads7846,cs=1,penirq_pull=2,speed=1000000,keep_vref_on=1,swapxy=0,pmax=255,xohms=60,xmin=200,xmax=3900,ymin=200,ymax=3900
You can do it also from webconf in Display - advanced view.

Change the /etc/X11/xorg.conf.d with the following:

Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option “Calibration” "3744 152 191 3922"
Option “SwapAxes” "1"
EndSection

Your calibration values may differ form the above. I did the calibration according this description:
https://www.waveshare.com/wiki/3.2inch_RPi_LCD_(B)#Touch_screen_calibration


#3

Thanks buddy… I’ll get on that right now


#4

Please, take a look to the “custom” folder in the zynthian-sys repository. Inside there is a subfolder called “display”, and inside there is a subfolder for every device that need customized config files:

The device’s subfolder name should match the name used in the webconf tool.

As you see, currently there is only 2 customized devices (the 2 officially supported displays :wink: ), but more displays should be added, specially for getting touch support out-the-box.

Please, consider helping to add more devices to the “custom” folder. It’s easy: When you have a configuration that works for you:

1.) Copy the files you have customized in the next 3 places:

  • /etc
  • /boot
  • /zynthian/config/zynthian_custom_config.sh

to a subfolder inside “/zynthian/zynthian-sys/custom”, with the same name used by the webconf tool. You must re-create the directory structure inside the subfolder. Take a look to the existing examples.

2.) Try to re-configure your display from the webconf tool. If it still work after this, probably you do a good work in the previous step, so we can continue.

3.) Fork the zynthian-sys repository and copy/upload the new custom subfolder with its content, as you do it in the step 1.

4.) Send a pull request with some explanation and i will review the changes and merge with the master repo for making available the custom configuration in the next update software :wink:

Kind Regards,


#5

I forked it and added the xorg.conf.d and overlays file

https://github.com/mheidt/zynthian-sys.git.

Haven’t had time to test it yet.


#6

Great @mheidt!
I will be waiting for your pull request …


#7

i tried , screen worked , but touch is still not working for me


#8

did you try my fork? in that case I would comply with jofemodos wish.


#9

@mheidt I copied your files from the GitHub and copied it to my zynth

didn’t work for my clone waveshare3.2b

not sure what fork is but I copied said files to my device


#10

have you really deleted the line starting with
dtoverlay=ads7846

The line reappears every time you select a different display and reselect waveshare32b


#11

The calibration of @norbim doesn’t work for rotated screens.

My numbers are
205 3754 3801 226

You can do your own calibration:

apt-get install -y xinput-calibrator

Create a file calibrate.sh on the zynthian that contains

#!/bin/sh
xinput_calibrator -v

make it executable

chmod +x calibrate.sh

stop zynthian and run calibrate

systemctl stop zynthian
startx ./calibrate.sh

Follow the screen instructions

In the ssh output where you started startx, you find the calibration values


Swaped X axis of touchpad - solved
#12

got touchscreen working, but its the opersite xy??? any sujgestions?


#13

yes, that’s what I was struggling with.
it seems, that you didn’t follow the exact instructions.
Directions change depending on the values in the 99-calibration file and the first line in the webconf ( boot/config.txt values)
The ones, that are checked in my fork work.


#14

cool,that worked for me, your calibration worked on mine

what make is your clone?? or is it original


#15

https://www.voelkner.de/products/838297/Raspberry-Pi-Display-Modul-Schwarz-RB-TFT3.2-V2-A-B-B-.html