Screen usage
- LCD HDMI screen usage
- LCD DSI screen usage
- Using TFT screen
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
Precautions:
- Ensure that the host computer is powered off before installing the expansion board.
- Avoid using the expansion board in damp or dusty environments.
- When installing the screen, please ensure power is disconnected before plugging/unplugging, and pay attention to the ribbon cable orientation to avoid damage.
- When installing the fan, please note the fan's current and voltage specifications 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, do not just upgrade 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.
Raspberry Pi Pre-installed TFTV2 System Download Links
-
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 st7796, supporting both capacitive touch 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, do not just 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 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, corresponding configuration is
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 degrees landscape, landscape (flipped).
dtoverlay=fly-tft-v2,r0 # 0 degrees portrait, vertical.
dtoverlay=fly-tft-v2,r180 # 180 degrees portrait, vertical (flipped).
- Only one configuration can be added, not multiple.
- Normally, the TFT touch orientation will automatically rotate to follow the display orientation; no need to modify the touch configuration within the system.
- 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; 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 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 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; 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, unit is Hz, default is 96000000 (if severe screen corruption occurs, appropriately reduce this value). -
Example:
dtoverlay=fly-tft-v2,speed=80000000 -
r0/r90/r180/r270[optional][no parameter needed]: Set the display and touch orientation for 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 needed]: Disable the TFT touch function. Default is enabled. -
Example:
dtoverlay=fly-tft-v2,disable_touch -
invx,invy[no parameter needed]: Set the TFT touch orientation.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 needed]: Set the TFT touch orientation, swap X and Y axes, i.e., landscape.- Example:
dtoverlay=fly-tft-v2,swapxy
- Example:
Note: All parameters can be set simultaneously (only one optional parameter can be chosen), multiple parameters are separated by commas, and multiple parameters must be on the same line.
Warning: Normally, only the four parameters
r0,r90,r180,r270are used. Other parameters are only used under special circumstances, especiallyinvx,invy,swapxy.
- Example:
dtoverlay=fly-tft-v2,speed=80000000,r270