Raspberry Pi Usage Instructions
Notes:
- Ensure the host machine is powered off before installing the expansion board.
- Avoid using the expansion board in humid or dusty environments.
- When installing the screen, do not hot-plug it, and pay attention to the orientation of the screen cable to prevent damage.
- When installing the fan, pay attention to the fan's current and voltage specifications to prevent damage.
- Please note that UART1 is enabled by default and does not require additional configuration.
- Please flash the latest image, such as
mainsailos, rather than just upgrading the kernel. - The Raspberry Pi can use all the interfaces!!!
- Note: The system kernel version used by Raspberry Pi must be greater than
5.17.x. Run the commanduname -rto check the kernel version.
Raspberry Pi Pre-installed TFTV2 System Download Links
-
System images suitable for Raspberry Pi zero2/zero2W/2B/3B/3B+/4B/CM4/5B
-
This image comes pre-installed with Klipper, Moonraker, mainsail, fluidd, klipper-screen, etc.
-
Click the download link below
-
Loading...
Installing the G2T
-
Reference below
Loading... -
Reference wiring
Loading...
Using the Onboard RS232 to Connect to the Tool Board
- After flashing the latest system on the Raspberry Pi, you need to Edit the config.txt file on the boot drive
- Please note that UART1 is enabled by default and does not need to be configured in the system. UART3 requires the following steps.
- Add it to config.txt as follows:
dtoverlay=uart3
- If using uart1, the id is, reference below
[mcu]
serial: /dev/ttyAMA0
baud: 250000
restart_method:command
- If using uart3, the id is, reference below
[mcu]
serial: /dev/ttyAMA1
baud: 250000
restart_method:command
Using the Onboard 5V FAN
-
If you need to control devices via the Raspberry Pi's 40-pin header, please install according to the Klipper tutorial RPi Microcontroller
Loading...
[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 #设置为上位机主控温度
control:watermark #控制方式
target_temp: 48 #上位机散热风扇启动温度
min_temp: 0 #最低温度,低于此温度将会报错
max_temp: 90 #最高温度,高于此温度将会报错
off_below: 0.10
kick_start_time: 0.50
max_speed: 0.8 #最大转速,为满功率运转时的80%
min_speed: 0.3 #最小转速,为满功率运转时的30%
Screen Usage Instructions
- Github address FLY-TFT
1. Introduction
The FLY-TFT-V2 is a TFT LCD screen based on the ST7796, supporting both capacitive and resistive touch. It features a resolution of 320x480 and uses an SPI interface.
2. System Installation
- Note: The kernel version of the system used on the Raspberry Pi must be greater than
5.17.x. Run the commanduname -rto check the kernel version. - Please flash the latest image, such as
mainsailos, rather than just upgrading the kernel. - You need to install KlipperScreen yourself.
- Use Raspberry Imager to install the latest MainsailOS
- Download and install Raspberry Imager
- Open Raspberry Pi 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 device supports 64-bit systems, choose rpi64
- Click CHOOSE STORAGE
- Select your storage device, such as an SD card
- Click NEXT and wait for the installation to complete.
4. Driver Installation
-
Install the FLY-TFT-V2 driver
git clone https://github.com/kluoyun/FLY-TFT.gitcd FLY-TFTsudo chmod +x ./scripts/install.sh./scripts/install.sh
5. Usage
- Touch functionality requires enabling I2C support; the corresponding configuration is
dtparam=i2c_arm=on
-
After installing the driver, the overlay support for
dtoverlay=fly-tft-v2needs to be added to the config.txt file. -
Open
/boot/config.txt(for bookworm systems, use/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 configuration.
dtoverlay=fly-tft-v2,r90 # 与默认方向一致,横向dtoverlay=fly-tft-v2,r270 # 270度横屏,横向(翻转)dtoverlay=fly-tft-v2,r0 # 0度竖屏,纵向dtoverlay=fly-tft-v2,r180 # 180度竖屏,纵向(翻转)- Only one of these configurations can be added; adding multiple is not allowed.
- Normally, the TFT touch orientation will automatically rotate to follow the display orientation, so there is no need to modify the touch configuration within the system.
-
After adding to the end of the file, run the command
sudo rebootto reboot the system.-
Ensure the hardware connections are correct.
-
The driver has been installed.
-
The overlay support for
dtoverlay=fly-tft-v2has been added in the/boot/config.txt(for bookworm systems,/boot/firmware/config.txt) file. -
Some systems may have a default fb0 device; the FLY-TFT might be assigned to the fb1 device. You will need to modify the configuration to enable the fb1 device.
-
Run the command
ls /dev/fb*to view devices. If both fb0 and fb1 devices appear, run the following command to enable the fb1 device (default is fb0). -
Run 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
-
6. 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 was successfully installed and step 5 was completed correctly, the KlipperScreen interface should now be displayed.
7. All Available Configurations
-
speed**Requires parameter: Sets the maximum SPI clock frequency for the TFT in Hz. Default is 96000000. (If severe screen tearing occurs, please lower this value appropriately.) -
Example:
dtoverlay=fly-tft-v2,speed=80000000 -
r0/r90/r180/r270Optional****No parameters required: Sets the display and touch orientation for the TFT. Default is 90 degrees. Options are 0, 90, 180, 270. (Only one configuration can be added.) -
Examples:
dtoverlay=fly-tft-v2,r90ordtoverlay=fly-tft-v2,r180 -
disable_touchNo parameters required: Disables the TFT touch function. Enabled by default. -
Example:
dtoverlay=fly-tft-v2,disable_touch -
invx,invyNo parameters required: Sets the touch orientation for the TFT.invxflips the X direction,invyflips the Y direction. -
Examples:
dtoverlay=fly-tft-v2,invxordtoverlay=fly-tft-v2,invyordtoverlay=fly-tft-v2,invx,invy -
swapxyNo parameters required: Sets the touch orientation for 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 (optional parameters can only be set to one value). Separate multiple parameters with commas. Multiple parameters must be on the same line.
- Warning: Normally, only the four parameters
r0,r90,r180, andr270are used. Other parameters are only for special cases, especiallyinvx,invy, andswapxy.
- Example:
dtoverlay=fly-tft-v2,speed=80000000,r270
Raspberry Pi zero2 and zero2W Notes
- These notes apply when using the FLY-TFT screen together with the G2T.
- For the Raspberry Pi zero2 and zero2w, you need to change the default display device. You can run the following script to modify it directly; otherwise, the display will not work.
- Please note that a reboot is required after executing the script.
sudo sed -i 's/\/dev\/fb0/\/dev\/fb1/g' /etc/X11/xorg.conf.d/99-fbdev.conf
Screen Installation
When connecting FLY-G2T to FLY-TFT-V2, please use the FPC 软排线-16P-反向-0.5mm-400mm cable and confirm the orientation of the cable's gold fingers before locking the connector latch.