Screen Usage
- LCD HDMI Screen Usage
- LCD DSI Screen Usage
- Using TFT Screen with G2T


DSI usage method
- After the image writing is completed, add the following command in /boot/config.txt
dtoverlay=vc4-kms-dsi-7inch

- Save and exit

Notes:
- Make sure the host computer is powered off before installing the expansion board.
- Avoid using the expansion board in a humid or dusty environment.
- When installing the screen, be careful not to plug or unplug the screen cable while powered on and pay attention to the direction of the screen cable to avoid damage.
- When installing the fan, be careful about the current and voltage specifications of the fan to avoid damage.
- Please note that UART1 is enabled by default and no configuration is needed
- Please flash the latest image such as
mainsailos
, not upgrade the kernel - The Raspberry Pi can use all interfaces!!!
- Note: The kernel version of the system used by the Raspberry Pi must be greater than
5.17.x
, execute the commanduname -r
to check the kernel version
Raspberry Pi Pre-installed TFTV2 System Download Link
-
System image suitable for Raspberry Pi 3B/3B+/4B/CM4/5B
-
Click the link below
-
Loading...
Installing Screen Driver
- Please note that you can directly use the pre-installed system
- Project address:FLY-TFT
Introduction
FLY-TFT-V2 is a TFT LCD screen based on st7796, supporting capacitive and resistive touch, with a resolution of 320x480, and uses the SPI interface
- You need to install KlipperScreen yourself
System Installation
Note: The kernel version of the system used by the Raspberry Pi must be greater than 5.17.x
, execute the command uname -r
to check the kernel version
Please flash the latest image such as mainsailos
, not upgrade the kernel
- Use Raspberry Imager to install the latest MainsailOS
- Download and install Raspberry Imager
- Open Raspberry Imager
- Click CHOOSE DEVICE
- Select the corresponding model according to your device
- Click CHOOSE OS
- Select Other specific-purpose OS
- Select 3D printing
- Select Mainsail OS
- Select the latest version. If your setup supports 64-bit systems, select rpi64
- Click CHOOSE STORAGE
- Select your storage device, such as an SD card
- Click NEXT, wait for the installation to complete
Driver Installation
- Install 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
Enable TFT Display
- I2C support needs to be enabled for touch, the corresponding configuration is
dtparam=i2c_arm=on
- After installing the driver, add the overlay support
dtoverlay=fly-tft-v2
to the config.txt file - Open
/boot/config.txt
(for bookworm system it is/boot/firmware/config.txt
)sudo nano /boot/config.txt
- Add the following configuration at the end of the file
dtoverlay=fly-tft-v2
- The default screen is displayed horizontally at 90 degrees. 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, horizontal (flipped)
dtoverlay=fly-tft-v2,r0 # 0-degree vertical screen, vertical
dtoverlay=fly-tft-v2,r180 # 180-degree vertical screen, vertical (flipped)
- Only one configuration can be added, not multiple
- Normally, the touch direction of the TFT will automatically rotate with the display direction, and there is no need to modify the touch configuration in the system
- After adding to the end of the file, execute the command
sudo reboot
to restart the system
Using TFT
- Please make sure the hardware connection is correct
- The driver is installed
- The overlay support
dtoverlay=fly-tft-v2
has been added to the file/boot/config.txt
(for bookworm system it is/boot/firmware/config.txt
) - Some systems may have a default fb0 device, FLY-TFT will be assigned to fb1 device, you need to modify the configuration file to enable the fb1 device
- Execute the command
ls /dev/fb*
to view the devices, if two devices fb0 and fb1 appear, execute the following command to enable the fb1 device (default is fb0) - Execute the following command to change the default configuration to the fb1 device
sudo sed -i 's/\/dev\/fb0/\/dev\/fb1/g' /etc/X11/xorg.conf.d/99-fbdev.conf
Using KlipperScreen
- MainsailOS does not install KlipperScreen by default, it needs to be installed manually
- Please refer to KlipperScreen or use kiauh for installation
- If KlipperScreen is successfully installed and step 5 is completed correctly, the KlipperScreen interface should now be displayed
All Available Configurations
-
speed
[requires parameter]: Set the maximum SPI clock frequency of the TFT, unit is Hz, default is 96000000 (if there is serious screen distortion, reduce this value appropriately) -
Example:
dtoverlay=fly-tft-v2,speed=80000000
-
r0/r90/r180/r270
[optional][no parameter required]: Set the display and touch direction of the TFT, default is 90 degrees, optional values are 0, 90, 180, 270 (only one configuration can be added) -
Example:
dtoverlay=fly-tft-v2,r90
ordtoverlay=fly-tft-v2,r180
-
disable_touch
[no parameter required]: Disable the touch function of the TFT, default is enabled -
Example:
dtoverlay=fly-tft-v2,disable_touch
-
invx
,invy
[no parameter required]: Set the touch direction of the TFT,invx
is X-direction flip,invy
is Y-direction flip -
Example:
dtoverlay=fly-tft-v2,invx
ordtoverlay=fly-tft-v2,invy
ordtoverlay=fly-tft-v2,invx,invy
-
swapxy
[no parameter required]: Set the touch direction of the TFT, swap the X-axis and Y-axis, i.e., horizontal screen- Example:
dtoverlay=fly-tft-v2,swapxy
- Example:
Note: All parameters can be set at the same time (only one optional parameter can be set), multiple parameters are separated by commas, and multiple parameters can only be on the same line
Warning: Normally, only the four parameters
r0
,r90
,r180
,r270
are used, and other parameters are only used in special situations, especiallyinvx
,invy
,swapxy
- Example:
dtoverlay=fly-tft-v2,speed=80000000,r270