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
- Raspberry Pi zreo 2 tested fine, Raspberry Pi zreo not tested
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.
- Install the latest MainsailOS using Raspberry Pi Imager
- Download and install Raspberry Pi Imager
- Open Raspberry Pi Imager
- Click CHOOSE OS
- Select the appropriate model for your device
- Click CHOOSE OS again
- Select Other specific-purpose OS
- Choose 3D printing
- Select Mainsail OS
- Choose the latest version available. If your setup supports 64-bit systems, select rpi64
- Click CHOOSE STORAGE
- Select your storage device, such as an SD card
- Click WRITE, and wait for the installation to complete.
- Install the FLY-TFT-V2 driver:
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
- After installing the driver, you need to add the overlay support of
dtoverlay=fly-tft-v2
in the config.txt file. - Open
/boot/config.txt
(/boot/firmware/config.txt
for bookworm system)sudo nano /boot/config.txt
- Add the following configuration at the end of the file
dtoverlay=fly-tft-v2
- The default screen is 90-degree horizontal screen display. If you need to rotate the screen, please use the following configuration
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)
- Only one configuration can be added, multiple configurations cannot be added
- Under normal circumstances, the touch direction of the TFT will automatically rotate to follow the display direction, without modifying the touch configuration in the system
- After adding it to the end of the file, execute the command
sudo reboot
to restart the system.
- Ensure the hardware connections are correct.
- Install the driver as instructed above.
- Add the overlay support
dtoverlay=fly-tft-v2
ordtoverlay=fly-tft-v2-r
in the/boot/config.txt
(/boot/firmware/config.txt
for bookworm system) file. - In some systems, there might be a default fb0 device; FLY-TFT may be assigned to fb1. You need to enable the fb1 device if it appears.
- Run the command
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). - Execute the following command to modify the configuration to use fb1 instead of fb0:
sudo sed -i 's/\/dev\/fb0/\/dev\/fb1/g' /etc/X11/xorg.conf.d/99-fbdev.conf
- KlipperScreen is not installed by default on MainsailOS and needs to be installed manually.
- Please refer to KlipperScreen or use kiauh to install
- If KlipperScreen is installed successfully and step 5 has been completed correctly, the KlipperScreen interface should be displayed at this time
-
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)- Example:
dtoverlay=fly-tft-v2,speed=80000000
- Example:
-
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)- Example:
dtoverlay=fly-tft-v2,r90
ordtoverlay=fly-tft-v2,r180
- Example:
-
disable_touch
[No parameters required]: Disable the touch function of TFT, the default is enabled- Example:
dtoverlay=fly-tft-v2,disable_touch
- Example:
-
invx
,invy
[No parameters required]: Set the touch direction of TFT,invx
is the X direction flip,invy
is the Y direction flip- Example:
dtoverlay=fly-tft-v2,invx
ordtoverlay=fly-tft-v2,invy
ordtoverlay=fly-tft-v2,invx,invy
- Example:
-
swapxy
[No parameters required]: Set the touch direction of TFT, the X axis and Y axis are interchanged, that is, horizontal screen- Example:
dtoverlay=fly-tft-v2,swapxy
- Example:
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.