Малинка: настройка 5″ дюймового экрана с тачскрином. XPT2046

14.07.2018 Выкл. Автор mumix

Использовал экран заказанный на Alli….s- XPT2046. Проблем с подключением нет. там все просто воткнул и работает.

Установил расбиан. Добавил в config.txt

hdmi_force_hotplug=1
hdmi_drive=2
hdmi_group=2
hdmi_mode=87
hdmi_cvt 800 480 60 6 0 0 0
dtparam=i2c_arm=on
dtparam=spi=on
dtoverlay=ads7846,penirq=25,speed=10000,keep_vref_on=0,penirq_pull=2,xohms=150

После добавления этих строк тач заработал. но по краям нельзя было нажать, курсор не доходил. Гуглил гуглил и наконец нагуглил. См. ниже

 

Finally find a solution to the problem of reason, tested with Raspbian 2017-03-02 is Perfect,
The link is as follows:
https://github.com/goodtft/LCD-show

If you are using the newest Raspbian version: 2017-03-02
You need to additional excute this two command bellow after Step1, 2, 3 excuted.
If not so, the Resistive touch to reverse or always be calibrated.
This additional command bellow is just for Raspbian — 2017-03-02:

sudo apt-get install xserver-xorg-input-evdev
sudo cp -rf /usr/share/X11/xorg.conf.d/10-evdev.conf /usr/share/X11/xorg.conf.d/45-evdev.conf
sudo reboot