Screen Usage
- LCD HDMI Screen Usage
- LCD DSI Screen Usage
- TFT Screen Usage
How to Use DSI
- After burning the image, enter
/boot/config.txtand add the following command
dtoverlay=vc4-kms-dsi-7inch
- Save and exit
Precautions:
- Ensure that the upper computer is powered off before installing the expansion board.
- Avoid using the expansion board in humid or dusty environments.
- When installing the screen, please do not plug or unplug it while powered on, and pay attention to the direction of the screen cable to avoid damage.
- When installing the fan, please 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, instead of upgrading 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. Run the commanduname -rto check the kernel version.
Raspberry Pi Pre-installed TFTV2 System Download Link
-
System images 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 touch and resistive touch. The resolution is 320x480, using 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. Run the command uname -r to check the kernel version.
Please flash the latest image, such as mainsailos, instead of 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 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, choose 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.gitcd FLY-TFTsudo chmod +x ./scripts/install.sh./scripts/install.sh
Enable TFT Display
-
Touch requires enabling I2C support. The corresponding configuration is
dtparam=i2c_arm=on.- After installing the driver, you need to add the
dtoverlay=fly-tft-v2overlay support in 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 orientation is 90-degree landscape. If you need to rotate the screen, use the following configuration.
dtoverlay=fly-tft-v2,r90 # Consistent with the default orientation, landscapedtoverlay=fly-tft-v2,r270 # 270-degree landscape, landscape (flipped)dtoverlay=fly-tft-v2,r0 # 0-degree portrait, portraitdtoverlay=fly-tft-v2,r180 # 180-degree portrait, portrait (flipped)- Only add one of these configurations, do not add multiple.
- Under normal circumstances, the TFT's touch orientation will automatically follow the display rotation, without needing to modify the touch configuration in the system.
- After adding it to the end of the file, run the command
sudo rebootto restart the system.
- After installing the driver, you need to add the
Using TFT
- Ensure the hardware connections are correct.
- The driver has been installed.
- The
dtoverlay=fly-tft-v2overlay support has been added to the/boot/config.txt(or/boot/firmware/config.txtfor Bookworm) file. - Some systems may have a default fb0 device. The FLY-TFT will be assigned to the fb1 device, so you need to modify the configuration file to enable the fb1 device.
- Run the command
ls /dev/fb*to view the devices. If two devices, fb0 and fb1, appear, run the following command to enable the fb1 device (the default is fb0). - Run the following command to modify 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 have KlipperScreen installed by default; manual installation is required.
- Please refer to KlipperScreen or use kiauh to install it.
- If KlipperScreen has been successfully installed and step 5 has been completed correctly, the KlipperScreen interface should now be displayed.
All Available Configurations
-
speed[Requires a parameter]: Sets the maximum SPI clock frequency for the TFT, in Hz. The default is 96000000 (if severe screen flickering occurs, please lower this value appropriately).- Example:
dtoverlay=fly-tft-v2,speed=80000000
- Example:
-
r0/r90/r180/r270[Optional][No parameter required]: Sets the display and touch orientation of the TFT. The default is 90 degrees. Optional values are 0, 90, 180, 270 (only one configuration can be added).- Example:
dtoverlay=fly-tft-v2,r90ordtoverlay=fly-tft-v2,r180
- Example:
-
disable_touch[No parameter required]: Disables the touch function of the TFT. It is enabled by default.- Example:
dtoverlay=fly-tft-v2,disable_touch
- Example:
-
invx,invy[No parameter required]: Sets the touch direction 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
- Example:
-
swapxy[No parameter required]: Sets the touch direction of the TFT by swapping the X and Y axes, i.e., landscape mode.- Example:
dtoverlay=fly-tft-v2,swapxy
- Example:
Note: All parameters can be set simultaneously (optional parameters can only have one setting selected). Multiple parameters should be separated by commas, and all parameters must be on the same line.
Warning: Under normal circumstances, only the four parameters
r0,r90,r180, andr270are used. Other parameters are used only in special cases, especiallyinvx,invy, andswapxy.
- Example:
dtoverlay=fly-tft-v2,speed=80000000,r270