Raspberry Pi活用/タッチパネル設定

提供: Medeshima wiki
ナビゲーションに移動 検索に移動

設定

xinput


Waveshare 9inch Capacitive Touch Monitor, 2560×1600 2K Resolution, IPS, Mini HDMI, Fully Laminated

概要

コンピュータ Raspberry Pi 400

参考

[pi4]
 
hvs_priority=0x32ff
gpu_mem=448
#max_usb_current=1
hdmi_group=2
hdmi_mode=77

Waveshare 7inch Resistive Touch Screen LCD, 1024×600, HDMI, IPS, Various Systems Support

概要

コンピュータ Raspberry Pi 4 Model B


参考

設定

$ sudo apt-get install xserver-xorg-input-evdev xinput-calibrator
$ sudo cp /usr/share/X11/xorg.conf.d/10-evdev.conf /etc/X11/xorg.conf.d/

  • /boot/config.txt
#hdmi_ignore_edid=0xa5000080
hdmi_group=2
hdmi_mode=87
hdmi_cvt 1024 600 60 6 0 0 0
#hdmi_drive=1
dtoverlay=ads7846,cs=1,penirq=25,penirq_pull=2,speed=50000,keep_vref_on=0,swapxy=0,pmax=255,xohms=150,xmin=200,xmax=3900,ymin=200,ymax=3900

  • /etc/X11/xorg.conf.d/99-calibration.conf
Section "InputClass"
        Identifier      "calibration"
        MatchProduct    "ADS7846 Touchscreen"
        Option  "Calibration"   "123 4011 3786 150"
        Option  "SwapAxes"      "1"
        Option "EmulateThirdButton" "1"
        Option "EmulateThirdButtonTimeout" "1000"
        Option "EmulateThirdButtonMoveThreshold" "300"
EndSection

$ xinput_calibrator
Calibrating EVDEV driver for "ADS7846 Touchscreen" id=12
	current calibration values (from XInput): min_x=127, max_x=3995 and min_y=3801, max_y=165

Doing dynamic recalibration:
	Setting calibration data: 123, 4011, 3786, 150
	--> Making the calibration permanent <--
  copy the snippet below into '/etc/X11/xorg.conf.d/99-calibration.conf' (/usr/share/X11/xorg.conf.d/ in some distro's)
Section "InputClass"
	Identifier	"calibration"
	MatchProduct	"ADS7846 Touchscreen"
	Option	"Calibration"	"123 4011 3786 150"
	Option	"SwapAxes"	"1"
EndSection

DRM VC4 V3D driverが有効になっていると、1024x600に設定できない。

  • /boot/config.txt
dtoverlay=vc4-kms-v3d

縦画面

display_rotate=3

Option  "Calibration"   "145 3796 128 3978"
Option  "SwapAxes"      "0"

Waveshare 3.5inch Resistive Touch Display (B) for Raspberry Pi, 480×320, IPS Screen, SPI (Rev2.0)

概要

コンピュータ Raspberry Pi Zero W


fbcp-ili9341を使用する。

参考

設定

  • /boot/cmdline.txt
fbcon=map:10 fbcon=font:ProFont6x11

  • /boot/config.txt
# Waveshare LCD 3.5
#hdmi_force_hotplug=1
hdmi_group=2
hdmi_mode=87
hdmi_cvt=480 320 60 1 0 0 0
#display_rotate=0

$ git clone https://github.com/juj/fbcp-ili9341.git
$ cd fbcp-ili9341
$ mkdir build
$ cd build
$ cmake -DSPI_BUS_CLOCK_DIVISOR=16 -DWAVESHARE35B_ILI9486=ON -DSTATISTICS=0 -DDISPLAY_INVERT_COLORS=ON ..
$ make -j
$ sudo ./fbcp-ili9341

/etc/rc.local

fbcp-ili9341 &

systemd

/etc/systemd/system

[Unit]
Description=

[Service]
ExecStart=

[Install]
WantedBy=multi-user.target


fbcp-ili9341/ili9486.cpp

WAVESHARE_SKIP_GAMMA_CONTROL

cmake option