Screen Usage
- LCD HDMI Screen Usage
- LCD DSI Screen Usage
- TFT Screen Usage
DSI Usage Method
- After the image is burned, enter the
/boot/config.txtfile and add the following command:
dtoverlay=vc4-kms-dsi-7inch
- Save and exit
Precautions:
- Ensure that the host computer's power is turned off before installing the expansion board.
- Avoid using the expansion board in damp or dusty environments.
- When installing the screen, be careful not to plug or unplug it while powered on, and pay attention to the orientation of the screen cable to prevent damage.
- When installing the fan, pay attention to the current and voltage specifications of the fan to avoid damage.
- Please note that UART1 is enabled by default and does not require further configuration.
- Please flash the latest image, such as
mainsailos, rather than upgrading 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 -rto check the kernel version.
Pre-installed TFTV2 System Download Links for Raspberry Pi
-
System image suitable for Raspberry Pi 3B/3B+/4B/CM4/5B
-
Click the download link below.
-
Loading...
Install 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 the ST7796, supporting both capacitive and resistive touch, with a resolution of 320x480, using the SPI interface.
- You need to install KlipperScreen yourself.
System Installation
Note: The system kernel version used by 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, rather than upgrading 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 based on your device.
- Click CHOOSE OS.
- Select Other specific-purpose OS.
- Select 3D printing.
- Select Mainsail OS.
- Select the latest version. If your device supports a 64-bit system, choose rpi64.
- Click CHOOSE STORAGE.
- Select your storage device, such as an SD card.
- Click NEXT and wait for the installation to complete.
Driver Installation
- 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
Enable TFT Display
- Touch requires enabling I2C support, with the corresponding configuration being
dtparam=i2c_arm=on.
- After installing the driver, you need to add the overlay support
dtoverlay=fly-tft-v2in the config.txt file. - Open
/boot/config.txt(for Bookworm system, it's/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 orientation is 90 degrees landscape. If you need to rotate the screen, use the following configurations.
dtoverlay=fly-tft-v2,r90 # Same as default orientation, landscape.
dtoverlay=fly-tft-v2,r270 # 270-degree landscape, landscape (flipped).
dtoverlay=fly-tft-v2,r0 # 0-degree portrait, vertical.
dtoverlay=fly-tft-v2,r180 # 180-degree portrait, vertical (flipped).
- Only one configuration can be added, not multiple.
- Normally, the TFT touch orientation will automatically rotate to follow the display orientation, and no modification of the system's touch configuration is needed.
- After adding it to the end of the file, execute the command
sudo rebootto restart the system.
Using TFT
- Ensure the hardware connection is correct.
- The driver is installed.
- The overlay support
dtoverlay=fly-tft-v2is added in the/boot/config.txtfile (for Bookworm system,/boot/firmware/config.txt). - Some systems may have a default fb0 device, and FLY-TFT may be assigned to fb1. You need to modify the configuration file to enable the fb1 device.
- Execute the command
ls /dev/fb*to check 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 correctly completed, the KlipperScreen interface should now be displayed.
All Available Configurations
-
speed[Requires parameter]: Set the maximum SPI clock frequency for the TFT, in Hz. Default is 96000000 (if severe screen tearing occurs, appropriately reduce this value). -
Example:
dtoverlay=fly-tft-v2,speed=80000000 -
r0/r90/r180/r270[Optional][No parameter required]: Set the display and touch orientation of the TFT. Default is 90 degrees. Options are 0, 90, 180, 270 (only one configuration can be added). -
Example:
dtoverlay=fly-tft-v2,r90ordtoverlay=fly-tft-v2,r180 -
disable_touch[No parameter required]: Disable the TFT touch function. Default is enabled. -
Example:
dtoverlay=fly-tft-v2,disable_touch -
invx,invy[No parameter required]: Set the touch orientation of the TFT.invxflips the X direction,invyflips the Y direction. -
Example:
dtoverlay=fly-tft-v2,invxordtoverlay=fly-tft-v2,invyordtoverlay=fly-tft-v2,invx,invy -
swapxy[No parameter required]: Set the touch orientation of the TFT, swapping the X and Y axes, i.e., landscape orientation.- Example:
dtoverlay=fly-tft-v2,swapxy
- Example:
Note: All parameters can be set simultaneously (only one optional parameter can be chosen), with multiple parameters separated by commas. Multiple parameters must be on the same line.
Warning: Normally, only the four parameters
r0,r90,r180,r270are used. Other parameters are used only in special cases, especiallyinvx,invy,swapxy.
- Example:
dtoverlay=fly-tft-v2,speed=80000000,r270