Preparing the Hardware Environment

  1. The Raspberry PI 3B motherboard
  2. External display screen, supporting HDMI interface (the system only supports HDMI display by default)
  3. 3.5-inch touch screen display -LCD screen (the system needs to follow the drive separately)
  4. 16GB TF card (Micro SD, hereafter referred to as SD card)
  5. Mouse (USB cable)
  6. Keyboard (USB cable)
  7. other
    • Heat sink (3 pieces)
    • Card reader
    • Ethernet cable
    • Main board power cord
    • HDMI cable,
    • Fan (optional)
    • Storage box (optional)
    • Housing (optional)

Installing the OS

  1. Burning system

    • Formatting an SD Card
      • Connect the SD card to the PC for formatting
      • Recommended tool: SD Formatter
      • There are two formats. Quick Format is used by default
      • If “Error.. FAT partition..” For related issues, try deep formatting Overwrite format
    • System selection. Two installation methods are recommended
      • Direct burn system
        • If there is no multi-system requirement, this method is recommended
        • To download the system image you need to install, use the official system image Raspbian Lite edition (full command line management).
        • Unpack the mirror
        • Download the image burning tool etcher.io
        • Burn the image to an SD card (refer to the official procedure)
      • NOOBS boot installation
        • Provide a variety of systems and tools to choose the guide
        • Download the official NOOBS
        • Decompress the ZIP file
        • Copy all files in the decompressed file to the SD card (after formatting)
  2. System installation | boot

    • Safely remove the SD card from the PC and insert it into the Raspberry motherboard
    • Power on the motherboard
    • If NOOBS is used, follow the instructions to initialize the system
    • If it is a mirror burning mode, the default into the system
    • Raspbian initializes the PI account, with the default password being Raspberry

The system environment is initialized

  1. The system update
sudo apt-get update
sudo apt-get upgrade
sudo apt-get clean
Copy the code
  1. Install the 3.5-inch LCD touch screen driver

    • You can choose display equipment according to their own situation, here we choose a 3.5 inch touch screen monitor -LCD screen
    • Raspbian only supports HDMI displays by default, so you need to install a separate driver to support LCD touchscreen displays
    • Of course, you can choose the customized image of the integrated driver. For details, refer to the previous step
    • Install the driver (note that different versions of the driver should be selected according to different pins, and the 26-pin SPI IO driver is selected here)
      • Raspbian PI LCD driver: 171219, for Raspbian-Jessie and later raspbian
      • The driver must be connected to the Internet when installed
      • Copy the downloaded driver to an SD card (either directly or via SCP transfer)
      • tar xzvf /boot/LCD-show-*.tar.gz
      • cd LCD-show/
      • chmod +x LCD35-show
      • ./LCD35-show
      • Switch the display mode and the command will restart automatically
    • Other LCD display related Settings
      • LCD and HDMI switch with each other
          Switch to HDMI display
          cd LCD-show/
          ./LCD-hdmi
          # Switch to LCD display
          cd LCD-show/
          ./LCD35-show
          The system restarts automatically after each switch
      Copy the code
      • Set the screen direction
          # Rotate 0 degrees:
          cd LCD-show/
          ./LCD35-show 0
          # Rotate 90 degrees:
          cd LCD-show/
          ./LCD35-show 90
          # Rotate 180 degrees:
          cd LCD-show/
          ./LCD35-show 180
          # Rotate 270 degrees:
          cd LCD-show/
          ./LCD35-show 270
      Copy the code
  2. The configuration of wifi

    • If you use a desktop system, connect to the network by following the normal procedure

    • If the terminal interface is used, the following two Settings are available:

      • Configure the supplicant.conf file on the SD card and add the wpa_supplicant.conf file in the SD card root directory
          country=CN
          ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1
          network={
              # wifi name
              ssid="YourNetworkSSID"
              # wifi pwd
              psk="Your Network's Passphrase"
              key_mgmt=WPA-PSK
          }
      Copy the code
      • On the terminal, perform the same configuration

        sudo vi /etc/wpa_supplicant/wpa_supplicant.conf
  3. Configure SSH

    • Configure the SSH file directly on the SD card (connecting to a PC) and add the empty SSH file in the root directory of the SD card
        # note: The file name is SSH
        sudo vi ssh 
        # Insert the motherboard and start the system. The SSH service will be enabled by default
    Copy the code
    • Configuring on the Terminal
        Check the SSH service status
        sudo service ssh status
        # start
        sudo service ssh start
        Set boot up
        sudo systemctl enable ssh
    Copy the code
    • Security configuration
        Change the password of the default user PI
        sudo passwd pi
        
        sudo vi /etc/ssh/sshd_config
        # Disable remote login by root
        > PermitRootLogin no
        SSH pub key is used for remote login
        > PasswordAuthentication no
        > RSAAuthentication yes  # System default
        > PubkeyAuthentication yes # System default
        # Change the SSH default port
        > Port 666
        # Restart
        sudo service ssh restart
    Copy the code
  4. Basic System Settings

    • sudo raspi-configThis command is used to boot the system Settings and perform basic configurations such as password, network, localization, and peripherals
    • locale setting
        locale
        # If you have the following questions:
        # "LOCALE: Cannot set LC_ALL to default locale: No such file or directory"
        
        sudo vi /etc/default/locale 
        > LANG="en_GB.UTF-8"
        > LC_ALL="en_GB.UTF-8"
        > LC_CTYPE="en_GB.UTF-8"
        > LANGUAGE="en_GB:en"
        
        dpkg-reconfigure locales 
    Copy the code

Extended application

  1. Install the version management tool Git
    sudo apt-get install git 
    git --version
Copy the code
  1. Upgrade the text editor vim
    sudo apt-get install vim
Copy the code
  1. Other Common Operations
    # to check the IP
    hostname -I
    ip addr
    
    # restart server
    sudo reboot
    
Copy the code

Refs

  1. Install Raspbian Stretch Lite Headless ( setup Wi-Fi and activate ssh without access to command line or using the network cable) on Raspberry Pi Zero W
  2. Raspberry Pi Software Guide
  3. 3.5-inch RPi LCD driver
  4. How to setup WiFi on Raspbian Jessie Lite
  5. Setting up Raspberry Pi WiFi with Static IP on Raspbian Stretch Lite
  6. Raspberry PI 3 command line configures wifi wireless connection and Bluetooth connection
Raspberry3B + 3.5-inch LCD Touch Screen -2018-01-17 v1.0 Publish: ] - [Jane books published link (https://www.jianshu.com/p/91a9e07a393e) - [Denver] release link (https://juejin.cn/post/6844903551722848270) - [dead simple Page]()Copy the code