Hi All,
We just had a customer with one of Adafruit’s 2.4" Touchscreens they couldn’t get working despite following the guides for a Pi 4. The HDMI worked flawlessly, but the touchscreen was a no go.
Adafruit’s last known good image no longer works, but the answer was buried in Adafruit’s forums:
- https://forums.adafruit.com/viewtopic.php?f=50&t=168984&p=828282#p828282
- https://forums.adafruit.com/viewtopic.php?f=50&t=104964
We’ll update our product page and get in touch with Adafruit to get them to update their guide!
To get it up and running, here are the steps we took:
-
Do a clean install of the latest Raspberry Pi OS and update everything.
-
Download the relevant pitft file from here: https://github.com/raspberrypi/linux/blob/rpi-5.4.y/arch/arm/boot/dts/overlays/pitft28-resistive-overlay.dts
-
Edit this file with your favourite text editor and add
spi-cpha;
to the relevant section:
-
Copy this modified file to /boot/overlays using:
sudo mv <file location>/pitft28-resistive-overlay.dts /boot/overlays/
-
Follow Adafruit’s Easy Install process as normal: https://learn.adafruit.com/adafruit-pitft-28-inch-resistive-touchscreen-display-raspberry-pi/easy-install-2
cd ~
sudo pip3 install --upgrade adafruit-python-shell click==7.0
sudo apt-get install -y git
git clone https://github.com/adafruit/Raspberry-Pi-Installer-Scripts.git
cd Raspberry-Pi-Installer-Scripts
sudo python3 adafruit-pitft.py --display=28r --rotation=90 --install-type=console
-
Finally, compile the modified overlay file and reboot:
sudo dtc -@ -I dts -O dtb -o /boot/overlays/pitft28-resistive.dtbo pitft28-resistive-overlay.dts
sudo reboot
If you follow these steps, you should have a working Pi TFT Hat!