Raspberry Pi User Manual
Precautions:
- Ensure that the host computer is powered off before installing the extension board.
- Avoid using the extension board in humid or dusty environments.
- When installing the screen, be careful not to plug or unplug it while powered on and pay attention to the direction of the screen cable to avoid damage.
- When installing the fan, pay attention to the current and voltage specifications of the fan to avoid damage.
- Please note that UART1 is already enabled by default and does not need to be configured.
- Please flash the latest image such as
mainsailos
, not an upgrade of the kernel. - Raspberry Pi can use all interfaces!!!
- Note: The system kernel version used by 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 zero2/zero2W/2B/3B/3B+/4B/CM4/5B
- This image is pre-installed with klipper, moonraker, mainsail, fulidd, klipper-screen, etc.
https://cdn.mellow.klipper.cn/IMG/Beta/RPI-TFT-IMG-new.img.xz
Installing G2T
- Below is for reference
- Reference wiring
Using the Onboard RS232 Connection Tool Version Method

- After flashing the latest system on Raspberry Pi, you need to edit the
config.txt
file under the boot disk - Please note that UART1 is already open by default and does not need to be configured in the system, UART3 needs to be performed in the following steps
- Add in
config.txt
dtoverlay=uart3
- If using uart1, the id is as follows
[mcu]
serial: /dev/ttyAMA0
baud: 250000
restart_method:command
- If using uart3, the id is as follows
[mcu]
serial: /dev/ttyAMA1
baud: 250000
restart_method:command
Using the Onboard 5VFAN
-
If you need to control devices with Raspberry Pi 40PIN, please follow the Klipper tutorial for installation RPi Microcontroller
[mcu host]
serial: /tmp/klipper_host_mcu
[temperature_sensor Raspberry Pi]
sensor_type: temperature_host
[temperature_fan core_fan]
pin: host:gpio12
max_power: 1.0
sensor_type: temperature_host #Set as the host computer's main control temperature
control:watermark #Control method
target_temp: 48 #Host computer cooling fan start temperature
min_temp: 0 #Minimum temperature, an error will be reported below this temperature
max_temp: 90 #Maximum temperature, an error will be reported above this temperature
off_below: 0.10
kick_start_time: 0.50
max_speed: 0.8 #Maximum speed, 80% of full power operation
min_speed: 0.3 #Minimum speed, 30% of full power operation
Screen Usage Method
- Github address FLY-TFT
1. Introduction
FLY-TFT-V2 is a TFT LCD screen based on st7796, supporting both capacitive and resistive touch, with a resolution of 320x480, using the SPI interface
2. System Installation
- Note: The system kernel version used by Raspberry Pi must be greater than
5.17.x
, execute the commanduname -r
to check the kernel version - Please flash the latest image such as
mainsailos
, not an upgrade of the kernel - You need to install KlipperScreen yourself
- 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 settings support 64-bit systems, choose rpi64
- Click CHOOSE STORAGE
- Select your storage device, such as an SD card
- Click NEXT, wait for the installation to complete
4. 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
5. Usage
- Touch requires enabling I2C support, corresponding configuration is
dtparam=i2c_arm=on
- After installing the driver, you need to add the overlay support
dtoverlay=fly-tft-v2
in the config.txt file - Open
/boot/config.txt
(bookworm system 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 90 degrees landscape display, if you need to rotate the screen, use the following configuration
dtoverlay=fly-tft-v2,r90 # Consistent with the default direction, landscape
dtoverlay=fly-tft-v2,r270 # 270 degrees landscape, landscape (flipped)
dtoverlay=fly-tft-v2,r0 # 0 degrees portrait, portrait
dtoverlay=fly-tft-v2,r180 # 180 degrees portrait, portrait (flipped)- Only one configuration can be added, not multiple
- Normally, the touch direction of TFT will automatically rotate following the display direction, 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- Please ensure that the hardware connection is correct
- Installed the driver
- Added the overlay support
dtoverlay=fly-tft-v2
in the/boot/config.txt
(bookworm system is/boot/firmware/config.txt
) file - 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 check the device, if two devices fb0 and fb1 appear, please execute the following command to enable the fb1 device (the default is fb0) - Execute the following command to modify the default configuration to fb1 device
sudo sed -i 's/\/dev\/fb0/\/dev\/fb1/g' /etc/X11/xorg.conf.d/99-fbdev.conf
6. Using KlipperScreen
- MainsailOS does not install KlipperScreen by default, you need to install it manually
- Please refer to KlipperScreen or use kiauh to install
- If KlipperScreen is successfully installed and step 5 is completed correctly, the KlipperScreen interface should be displayed at this time
7. All Available Configurations
-
speed
**Requires parameters: Set the maximum SPI clock frequency of TFT, in Hz, the default is 96000000 (if serious screen flicker occurs, please appropriately reduce this value) -
Example:
dtoverlay=fly-tft-v2,speed=80000000
-
r0/r90/r180/r270
Optional No parameters: Set the display and touch direction of TFT, the 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 parameters: Disable the touch function of TFT, enabled by default -
Example:
dtoverlay=fly-tft-v2,disable_touch
-
invx
,invy
No parameters: Set the touch direction of TFT,invx
is X-axis flip,invy
is Y-axis flip -
Example:
dtoverlay=fly-tft-v2,invx
ordtoverlay=fly-tft-v2,invy
ordtoverlay=fly-tft-v2,invx,invy
-
swapxy
No parameters: Set the touch direction of TFT, swap X and Y axes, that is, landscape- Example:
dtoverlay=fly-tft-v2,swapxy
- Example:
- Note: All parameters can be set at the same time (only one optional parameter can be selected), multiple parameters are separated by commas, and multiple parameters can only be on the same line
- Warning: Normally only
r0
,r90
,r180
,r270
four parameters are used, other parameters are only used in special cases, especiallyinvx
,invy
,swapxy
- Example:
dtoverlay=fly-tft-v2,speed=80000000,r270
Raspberry Pi zero2 and zero2W Precautions

- This precaution is for the instructions of using FLY-TFT screen with G2T
- Raspberry Pi zero2 and zero2w need to modify the default display device, you can execute the following code to modify directly, otherwise it will not display
- Please note that you need to restart after executing before you can use it
sudo sed -i 's/\/dev\/fb0/\/dev\/fb1/g' /etc/X11/xorg.conf.d/99-fbdev.conf
Screen Installation
