1. Buy 3.5 Inch HDMI Screen from following link:

Buy from OSOYOO Buy from US Buy from UK Buy from DE Buy from IT Buy from FR Buy from ES Buy from JP

2. Buy 3.5 Inch HDMI Screen with case:

Buy from US Buy from UK Buy from DE Buy from IT Buy from FR Buy from ES Buy from JP

Overview

Note: Install touch driver for RaspiOS Bulleyes and Buster, please following the link: https://osoyoo.com/?p=56145

The OSOYOO 3.5HDMI resistive touchscreen does not work properly when using the default Wayfire graphics system on the Raspberry Pi 4B and 5B. However, if you change the default graphics system on these models to X11, it will work fine.

The tutorial you mentioned for adapting the OSOYOO 3.5HDMI resistive touchscreen on the Bullseye system should still be applicable. However, the touchscreen functionality does not seem to work on Bookworm’s default Wayfire graphics system. If you want to adjust this resistive touchscreen to the default Wayfire graphics system in Bookworm, you may need to perform additional configuration steps. In this case, you may need to explore other methods or configurations to make the ADS7846 touchscreen compatible with Wayfire in Bookworm. It is recommended that you consult the official documentation or community forums for Bookworm and Wayfire for further assistance in adjusting the touchscreen.

Click here for more information about Bookworm.

Installation for configured image

If you have difficulty installing the driver, or if you still can’t use the display properly after installing the driver, please try our configured images for tested. DO NOT need any driver installation steps. Just need download and write the image into the TF card:
Step 1: Connect touch screen LCD display to your Raspberry Pi
Step 2: Download LCD screen driver RAR file from Download Link in the following table.
Step 3: Unzip the driver image file downloaded from step 2).
Step 4: Prepare a newly formatted Micro SD memory card(TF card) with USB Micro SD card reader, recommend sizes are 8G, 16G, 32G. If you don’t know how to format Micro SD card, please download SDFormatter from https://www.sdcard.org/downloads/formatter_4/.
Step 5: Download the Raspberry Pi imager tool from https://www.raspberrypi.com/software/, and use it to write image file (from Step 3) into TF card.

 

Image Name Version Support Password Download Link
Raspios-Bullseye-arm64bit 2024-3-12 Pi5/Pi4/Pi3B+/Pi2/Pi3 user:pi, password:raspberry https://drive.google.com/file/d/1tCkFmrKFlqbx5IfD-QTcdvbjDLV6pKPm/view?usp=drive_link
Raspios-bookworm-arm64bit 2023-12-05 Pi5/Pi4/Pi3B+/Pi2/Pi3 user:pi,  password:raspberry https://drive.google.com/file/d/1Eg3idShAvVCzdXBD9LvKOql8qnAQltjK/view?usp=sharing
Raspios-bookworm-arm64 2024-03-15 Pi5/Pi4/Pi3B+/Pi2/Pi3 user:pi,  password:raspberry https://drive.google.com/file/d/1pXJbA6-dVVYuyFM3v-H_3qXCHOsso9W4/view?usp=sharing

Step 6: Expand filesystem

sudo raspi-config

Choose 6 Advanced OptionsA1 Expand filesystem

top

Installation for Bookworm OS

Note: This installation guide supports Raspios-bookworm 2024-03-15.

Hardware Connection

Connect the GPIO and HDMI interface

Raspberry Pi leads out 40 GPIO pins, while the screen leads out 12 pins. When connecting, pay attention to the corresponding pins and Raspberry Pi pins.

top

Install image file & Driver install

1) Install the Bookworm image as the official website or follow our tutorial.

2) After the image has finished writing, open the config.txt file in the root directory of the TF card, add the following code at the end of config.txt, then save and quit the TF card safely.

dtoverlay=bw-ads7846,penirq=25,xmin=200,xmax=3900,ymin=200,ymax=3900,speed=50000

3) Download the bw-ads7846.dtbo file. Copy this files to the overlays directory (/boot/overlays/).

4)Quit the TF card safely

5) Insert the TF card into the Raspberry Pi, power on the Raspberry Pi, and wait for more than 10 seconds to display normally. But the touch is abnormal at that time, and the touch needs to be calibrated as the following steps.

top

Touch settings

Note: Recommend to remotely control Raspberry Pi via ssh, VNC or other remote desktop tools, as the resolution is too high as default. (Here we use putty for Windows users. You can learn more about remotely control Raspberry Pi from: https://osoyoo.com/?p=56660)
Step 1) Set to use X11 instead of Wayland,

1. Run the following commends firstly:
sudo raspi-config

2. Then select Advanced Options, then Wayland which now controls which backend to use for the desktop, then X11. Save your settings and reboot the Raspberry Pi. In Bookworm it now defaults to Wayland on the PI4 & soon PI5, so we need to switch it to W1 X11.



Step 2) Change the Screen Configuration
Use a mouse to control your screen, then Click the Raspberry Pi icon -> Preferences -> Screen Configuration, in the new window, click layout -> screen -> HDMI -> resolution -> 680×480, then click Apply, and click OK in the new pop. We recommend setting the resolution to 640×480.
Note: Raspberry Pi OS Bookworm branch system, since dtoverlay=vc4-kms-v3d is loaded by default, it is invalid to modify the resolution in /boot/config.txt. 

Step 3)Install xpt2046 driver, and calibrator by typing the following commends
sudo apt install xserver-xorg-input-evdev
sudo apt install -y xinput-calibrator


Step 4)Config touch calibration files

1. Run the following commends
sudo cp -rf /usr/share/X11/xorg.conf.d/10-evdev.conf /usr/share/X11/xorg.conf.d/45-evdev.conf
sudo nano /usr/share/X11/xorg.conf.d/99‐calibration.conf

2. Add the following parameters in 99-calibration.conf,

Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "211 3942 3905 141"
Option  "SwapAxes"  "1"
EndSection

3. Press ctrl + X then Y, then enter to save this file, then run the following commend to reboot your Raspberry Pi

sudo reboot

Step 5) Calibrate touch

a. Use mouse to control your screen, then click [Preferences]-[Calibrate Touchscreen] from main menu, (or enter DISPLAY=:0.0 xinput_calibrator in the terminal), click four crossbar points on corners, it will show the calibration values which are similar to previously written to the 99-calibration.conf file.

b. After calibration (click four cross bar points on corners), it will show the calibration values which are similar to previously written to the 99-calibration.conf file.

c. Edit 99‐calibration.conf file again by typing the following commend:

sudo nano /usr/share/X11/xorg.conf.d/99‐calibration.conf

d. Replace the following lines with new values shown in the calibration result (from step b). Check touch, repeat calibration if it is not correct.
Option  “Calibration” “211 3942 3905 141”
Option  “SwapAxes” “1”

Remark: Doing so means you are no longer using Wayland. Might a temporary solution only as all Pi’s will be ‘converted’ to use Wayland and then that option will be dropped most likely. Yes – it would be great if I could figure out how to calibrate within Wayland, but I just couldn’t find anything.
For now, Wayland is only the default on Raspberry Pi 4 and 5. The performance of Wayfire on earlier platforms is still being optimized, so for now they will continue to run the old X11 display server and the Openbox window manager, but at some point these platforms will also be switched to Wayfire.

Screen orientation settings

Click the Raspberry Pi icon -> Preferences -> Screen Configuration, in the new window, click layout -> screen -> HDMI -> orientation-> Select the appropriate direction, then click Apply, and click OK in the new pop.

After completing the rotation, you need to recalibrate the touch as above operations.

top

We’ll be following the official Raspberry Pi posts and updating the tutorials!

How to verify that your X11 desktop system is running properly

You can tell which one you are running by using “echo $GDMSESSION” in a terminal.(Connecting to the system using SSH-like tools and executing this command will not produce any results.)
“LXDE-pi-wayfire” means Wayland.
“LXDE-pi-x” means X11

top