Getting started with Raspberry Pi SPI display

Getting started with Raspberry Pi SPI display

Introduction

Today we are going to learn how to interface LCD TFT display using SPI interface with Raspberry Pi and also how to change the orientation of the screen. The SPI display comes in different sizes and speeds. Here is the list of all different type of RPi display with SPI interface from waveshare.

Part
Number
Resolution. Display Interface Touch Panel InterfaceFor use withDimension (mm)Toughened Glass CoverDisplay Tech.
2.8inch RPi LCD (A)320×240SPISPIPiAs the Pi 3B+×TFT
3.2inch RPi LCD (C)320×240High-Speed SPISPIPiAs the Pi 3B+×TFT
3.5inch RPi LCD (B)480×320SPISPIPiAs the Pi 3B+×IPS
3.5inch RPi LCD (C)480×320High-Speed SPISPIPiAs the Pi 3B+×TFT
4inch RPi LCD (C)480×320High-Speed SPISPIPi96 × 61×IPS

source: https://www.waveshare.com

Pre Driver Installation 

  • Make an SD card with Rasbian OS or any other OS of your wish.
  • Insert the SD card to your Raspberry Pi.
  • Connect an HDMI monitor, USB keyboard and mouse.
  • Connect your Display with Raspberry Pi.
  • Connect a 2.5 amps 5v adapter and boot up the Pi.

  • Open the terminal window.
  • Type git clone https://www.github.com/LCD-show.git   to download the driver files.
  • Type cd LCD-show  to go inside the downloaded folder 
  • As I am using the 3.2-inch display without high-speed SPI and with Rasbian OS I am using this comment to install the driver sudo ./LCD32-show. below is a table of different installation comments for different LCDs and OS.
  • Now your Pi will automatically get rebooted and your desktop will be displayed on the LCD screen instead of your HDMI monitor.
 
For 2.8inch RPi LCD (A)
 
  • sudo ./LCD28-show
  • or (for Raspbian-Stretch-Lite) sudo ./LCD28-show lite
 
For 3.2inch RPi LCD (B)
 
  • sudo ./LCD32-show
  • or (for Raspbian-Stretch-Lite) sudo ./LCD32-show lite
 
For 3.5inch RPi LCD (A)
 
  • sudo ./LCD35-show
  • or (for Raspbian-Stretch-Lite) sudo ./LCD35-show lite
 
For 3.5inch RPi LCD (B) old version
 
  • sudo ./LCD35B-show
  • or (for Raspbian-Stretch-Lite) sudo ./LCD35B-show lite
 
For 3.5inch RPi LCD (B) V2 version
 
  • sudo ./LCD35B-show-V2
  • or (for Raspbian-Stretch-Lite) sudo ./LCD35B-show-V2 lite
 
For 3.5inch RPi LCD (C)
 
  • sudo ./LCD35C-show
  • or (for Raspbian-Stretch-Lite) sudo ./LCD35C-show lite
 
For 4inch RPi LCD (A)
 
  • sudo ./LCD4-show
  • or (for Raspbian-Stretch-Lite) sudo ./LCD4-show lite
 

Video Instructions 

 

Changing Orientation 

There are a total of 4 screen orientation possible,
  • 0 degree
  • 90 degree
  • 180 degree
  • 270 degree

 

 
Follow these steps to set the orientation,
  • Open a terminal window, either you can directly open from your raspberry pi or you can use ssh.
  • type cd lcd-show to enter inside the downloaded driver folder, which we have done in the previous step.
  • Now type the below-provided code for whichever the orientation you need,
 
For 2.8inch RPi LCD (A)
 
  • sudo ./LCD28-show X
  • X should be 0, 90, 180 or 270
 
 
For 3.2inch RPi LCD (B)
 
  • sudo ./LCD32-show X
  • X should be 0, 90, 180 or 270
 
 
For 3.5inch RPi LCD (A)
 
  • sudo ./LCD35-show X
  • X should be 0, 90, 180 or 270
 
 
For 3.5inch RPi LCD (B)
 
  • sudo ./LCD35-show X
  • X should be 0, 90, 180 or 270

 

For 35inch RPi LCD (B) V2
 
  • sudo ./LCD32B-show-V2 X
  • X should be 0, 90, 180 or 270

 

For 3.5inch RPi LCD (C)
 
  • sudo ./LCD35-show X
  • X should be 0, 90, 180 or 270

 

For 4inch RPi LCD (A)
 
  • sudo ./LCD4-show X
  • X should be 0, 90, 180 or 270

 

Video Instructions 

 

Leave a Reply

×
×

Basket