Skip to main content

Raspberry Pi User Manual

Notes:

  • Make sure the host computer is powered off before installing the expansion board.
  • Avoid using the expansion board in humid or dusty environments.
  • When installing the screen, pay attention to not plug or unplug the screen cable while powered on, and note the direction of the screen cable to avoid 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 no configuration is needed in the settings.
  • Please flash the latest image such as mainsailos, not 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, execute the command uname -r to check the kernel version
  • System image applicable to Raspberry Pi zero2/zero2W/2B/3B/3B+/4B/CM4/5B

  • This image pre-installs klipper, moonraker, mainsail, fulidd, klipper-screen, etc.

  • Click the link below to download

  • Loading...

Installing G2T

  • Below is a reference
  • Reference wiring

Using the built-in RS232 to connect the tool version method

  • After the Raspberry Pi is flashed with the latest system, you need to edit the config.txt file in the boot disk
  • Please note that UART1 is already enabled by default and no configuration is needed in the system. UART3 needs to perform the following steps
  • Add to config.txt as follows
dtoverlay=uart3
  • If using uart1 id, the following is a reference
[mcu] 
serial: /dev/ttyAMA0
baud: 250000
restart_method:command
  • If using uart3 id, the following is a reference
[mcu] 
serial: /dev/ttyAMA1
baud: 250000
restart_method:command

Built-in 5VFAN usage

  • If you need to control devices with the Raspberry Pi 40PIN, please install according to the Klipper tutorial RPi Microcontroller

[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 # Set to the mainboard temperature of the host
control:watermark # Control mode
target_temp: 48 # The temperature at which the host's cooling fan starts
min_temp: 0 # Minimum temperature, an error will be reported if it is lower than this
max_temp: 90 # Maximum temperature, an error will be reported if it is higher than this
off_below: 0.10
kick_start_time: 0.50
max_speed: 0.8 # Maximum speed, 80% of full power operation
min_speed: 0.3 # Minimum speed, 30% of full power operation

Screen usage method

  • Github address FLY-TFT

1. Introduction

FLY-TFT-V2 is a TFT LCD screen based on st7796, supporting capacitive touch and resistive touch, resolution 320x480, using SPI interface

2. System Installation

tip
  • Note: The kernel version of the system used by the 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, not upgrading the kernel
  • You need to install it yourself KlipperScreen
  • 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, select rpi64
    • Click CHOOSE STORAGE
    • Select your storage device, such as SD card
    • Click NEXT, wait for the installation to complete

4. Driver Installation

  • Install 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

5. Usage

tip
  • Touch requires enabling I2C support, the corresponding configuration is dtparam=i2c_arm=on
  1. After installing the driver, add the overlay support dtoverlay=fly-tft-v2 to the config.txt file
  2. Open /boot/config.txt (for bookworm system, it is /boot/firmware/config.txt)
    sudo nano /boot/config.txt
  3. Add the following configuration at the end of the file
    dtoverlay=fly-tft-v2
  • The default screen is displayed in landscape orientation at 90 degrees. If you need to rotate the screen, 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 (flipped)
    dtoverlay=fly-tft-v2,r0 # 0-degree vertical screen, vertical
    dtoverlay=fly-tft-v2,r180 # 180-degree vertical screen, vertical (flipped)
    • Only one configuration can be added, not multiple
    • Normally, the touch direction of the TFT will automatically rotate along with the display direction, and there is no need to modify the touch configuration in the system
  1. After adding to the end of the file, execute the command sudo reboot to restart the system

    • Please make sure the hardware connection is correct
    • The driver is installed
    • The overlay support dtoverlay=fly-tft-v2 has been added to the file /boot/config.txt (for bookworm system, it is /boot/firmware/config.txt)
    • Some systems may have a default fb0 device, and FLY-TFT will be assigned to the fb1 device. You need to modify the configuration file to enable the fb1 device
    • Execute the command ls /dev/fb* to view the devices. If two devices fb0 and fb1 appear, execute the following command to enable the fb1 device (the 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

6. Using KlipperScreen

  • MainsailOS does not come with KlipperScreen by default, and it needs to be installed manually
  • Please refer to KlipperScreen or use kiauh to install
  • If KlipperScreen is successfully installed and step 5 is completed correctly, the KlipperScreen interface should now be displayed

7. All available configurations

  • speed **requires parameters: set the maximum SPI clock frequency of the TFT, unit Hz, default 96000000 (if there is severe screen distortion, reduce this value appropriately)

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

  • r0/r90/r180/r270 optional no parameters required: set the display and touch direction of the TFT, default is 90 degrees, optional values are 0,90,180,270 (only one configuration can be added)

  • Example: dtoverlay=fly-tft-v2,r90 or dtoverlay=fly-tft-v2,r180

  • disable_touch no parameters required: disable the touch function of the TFT, default is enabled

  • Example: dtoverlay=fly-tft-v2,disable_touch

  • invx,invy no parameters required: set the touch direction of the TFT, invx is X-axis flip, invy is Y-axis flip

  • Example: dtoverlay=fly-tft-v2,invx or dtoverlay=fly-tft-v2,invy or dtoverlay=fly-tft-v2,invx,invy

  • swapxy no parameters required: set the touch direction of the TFT, swap X and Y axes, i.e., horizontal screen

    • Example: dtoverlay=fly-tft-v2,swapxy
tip
  • Note: All parameters can be set at the same time (only one optional parameter can be selected), separated by commas, and multiple parameters can only be on the same line
  • Warning: Normally, only the four parameters r0, r90, r180, r270 are used, and other parameters are only used in special cases, especially invx, invy, swapxy
  • Example: dtoverlay=fly-tft-v2,speed=80000000,r270

Notes for Raspberry Pi zero2 and zero2W

  • This note is for the explanation of using FLY-TFT screens with G2T
  • The Raspberry Pi zero2 and zero2w need to modify the default display device, you can execute the following code directly to modify, otherwise it cannot be displayed
  • Please note that after execution, you need to restart to use
sudo sed -i 's/\/dev\/fb0/\/dev\/fb1/g' /etc/X11/xorg.conf.d/99-fbdev.conf

Screen installation

Loading...
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -