We have received feedback from users that if capacitive touch is not available, please follow FAQ to troubleshoot the problem.
FLY-TFT-V2 is a TFT LCD screen based on the ST7796 controller, supporting both capacitive and resistive touch input. It has a resolution of 320x480 pixels and communicates via the SPI interface.
Supported devices: Raspberry Pi zreo 2
, Raspberry Pi zreo 2W
, Raspberry Pi 3B
, Raspberry Pi 3B+
, Raspberry Pi 4B
, Raspberry Pi 5
, Raspberry Pi CM4IO
Note: The kernel version used by your Raspberry Pi must be greater than
5.17.x
. Run the commanduname -r
to check your current kernel version.
git clone https://github.com/kluoyun/FLY-TFT.git
cd FLY-TFT
sudo chmod +x ./scripts/install.sh
./scripts/install.sh
Touch needs to enable I2C support, and the corresponding configuration is
dtparam=i2c_arm=on
dtoverlay=fly-tft-v2
in the config.txt file./boot/config.txt
(/boot/firmware/config.txt
for bookworm system)
sudo nano /boot/config.txt
dtoverlay=fly-tft-v2
dtoverlay=fly-tft-v2,r90 # Same as the default direction, horizontal
dtoverlay=fly-tft-v2,r270 # 270-degree horizontal screen, horizontal (flip)
dtoverlay=fly-tft-v2,r0 # 0 degree vertical screen, portrait orientation
dtoverlay=fly-tft-v2,r180 # 180-degree vertical screen, portrait (flip)
sudo reboot
to restart the system.dtoverlay=fly-tft-v2
or dtoverlay=fly-tft-v2-r
in the /boot/config.txt
(/boot/firmware/config.txt
for bookworm system) file.ls /dev/fb*
to view the devices. If you see both fb0 and fb1, execute the following commands to enable the fb1 device (default is fb0).sudo sed -i 's/\/dev\/fb0/\/dev\/fb1/g' /etc/X11/xorg.conf.d/99-fbdev.conf
speed
[Parameter required]: Set the maximum SPI clock frequency of TFT, in Hz, the default is 96000000 (please lower this value appropriately if severe screen blur occurs)
dtoverlay=fly-tft-v2,speed=80000000
r0/r90/r180/r270
[Optional][No parameters required]: Set the display and touch direction of TFT, the default is 90 degrees, the optional values are 0,90,180,270, (only A configuration can be added)
dtoverlay=fly-tft-v2,r90
or dtoverlay=fly-tft-v2,r180
disable_touch
[No parameters required]: Disable the touch function of TFT, the default is enabled
dtoverlay=fly-tft-v2,disable_touch
invx
, invy
[No parameters required]: Set the touch direction of TFT, invx
is the X direction flip, invy
is the Y direction flip
dtoverlay=fly-tft-v2,invx
or dtoverlay=fly-tft-v2,invy
or dtoverlay=fly-tft-v2,invx,invy
swapxy
[No parameters required]: Set the touch direction of TFT, the X axis and Y axis are interchanged, that is, horizontal screen
dtoverlay=fly-tft-v2,swapxy
Note: All parameters can be set at the same time (only one setting can be selected for optional parameters). Multiple parameters are separated by commas. Multiple parameters can only be on the same line.
Warning: Under normal circumstances, only four parameters
r0
,r90
,r180
,r270
are used, other parameters are only used in special circumstances, especiallyinvx
,invy
,swapxy
- Example:
dtoverlay=fly-tft-v2,speed=80000000,r270
We've tested this on the latest MainsailOS system. If you encounter any issues, please feel free to provide feedback through Github Issues.