Mellow-3D / FLY-TFT

FLY-TFT Driver
2 stars 1 forks source link

FLY-TFT

中文

This is the RPI driver repository for FLY-TFT-V2

We have received feedback from users that if capacitive touch is not available, please follow FAQ to troubleshoot the problem.

1. Introduction

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

2. System Installation

Note: The kernel version used by your Raspberry Pi must be greater than 5.17.x. Run the command uname -r to check your current kernel version.

3. Driver Installation

  1. 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

4. Enable TFT display

Touch needs to enable I2C support, and the corresponding configuration is dtparam=i2c_arm=on

  1. After installing the driver, you need to add the overlay support of dtoverlay=fly-tft-v2 in the config.txt file.
  2. Open /boot/config.txt (/boot/firmware/config.txt for bookworm system)
     sudo nano /boot/config.txt
  3. 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
  4. After adding it to the end of the file, execute the command sudo reboot to restart the system.

5. Usage TFT

6. Usage KlipperScreen

7. All available configurations

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, especially invx, invy,swapxy

  • Example: dtoverlay=fly-tft-v2,speed=80000000,r270

8. Feedback

We've tested this on the latest MainsailOS system. If you encounter any issues, please feel free to provide feedback through Github Issues.