Display Raspberry Pi 3.2inch LCD 320x240 Resistive Touch Screen (9201)

Assuming that this “Waveshare 3.2inch RPi LCD (B)” is your display and that you are starting from a fresh Volumoi 3 installation try the following:

  1. Install the Touch Display plugin.

  2. Download the display specific overlay:

wget https://github.com/waveshare/LCD-show/raw/master/waveshare32b-overlay.dtb

  1. Copy the overlay to “/boot/overlays/waveshare32b-overlay.dtbo”:

sudo cp waveshare32b-overlay.dtb /boot/overlays/waveshare32b-overlay.dtbo

  1. Open “boot/userconfig.txt”:

nano /boot/userconfig.txt

  1. Add the following lines:
dtparam=spi=on
dtoverlay=waveshare32b-overlay

It could be necessary to add a rotation value to the overlay later on.

  1. Save “/boot/userconfig.txt” by typing Ctrl+x then y and Enter.

  2. Download “99-calibration.conf-32” as it might be necessary to calibrate the screen:

wget https://raw.githubusercontent.com/waveshare/LCD-show/master/etc/X11/xorg.conf.d/99-calibration.conf-32

  1. Create “/etc/X11/xorg.conf.d” in case it’s missing and copy “99-calibration.conf-32” to “/etc/X11/xorg.conf.d/99-calibration.conf”:

sudo mkdir -p /etc/X11/xorg.conf.d
sudo cp 99-calibration.conf-32 /etc/X11/xorg.conf.d/99-calibration.conf

  1. Download “99-fbturbo.conf” if this file should be missing from “/usr/share/X11/xorg.conf.d”:

sudo wget https://raw.githubusercontent.com/waveshare/LCD-show/master/usr/share/X11/xorg.conf.d/99-fbturbo.conf -P /usr/share/X11/xorg.conf.d

  1. Open “/usr/share/X11/xorg.conf.d/99-fbturbo.conf” with

sudo nano /usr/share/X11/xorg.conf.d/99-fbturbo.conf

and change

Driver "fbturbo"

to

Driver "fbdev"

If the file should contain

Option "fbdev" "/dev/fb0"

change it to

Option "fbdev" "/dev/fb1"

Save the file hitting Ctrl-x, y and Enter.

  1. For touch function you probably need to install “xserver-xorg-input-evdev” running

sudo apt-get install xserver-xorg-input-evdev

and then execute

sudo cp /usr/share/X11/xorg.conf.d/10-evdev.conf /usr/share/X11/xorg.conf.d/45-evdev.conf

  1. Reboot.

  2. If the display should not have the orientation you are looking for, add a rotation parameter to the overlay in “/boot/userconfig.txt” so it looks something like this:

dtoverlay=waveshare32b:rotate=90

This would rotate the display (not touch) by 90 degrees clockwise.

  1. Reboot once again.

  2. If the display rotation appears to be correct now, check if the touch function is already properly aligned to the display. If this should not the be case try to find out by what amount touch has to be rotated. Then head over to the Touch Display’s configuration page and set this value in the rotation setting.

  3. Reboot and check if touch is properly aligned to the display now. It is possible that setting the rotation in the prior step does not suffice. This would be the case if the screen’s touch axes are inverted or swapped which is not uncommon on these kind of screens… Then you would have to find out how the axes are inverted or swapped to be able to find a correction.

Edit: Inserted an additional step as a new number 9.

2 Likes