Difference between revisions of "Raspberry Pi guides for SPI e-Paper"

From Waveshare Wiki
Jump to: navigation, search
(Created page with "==Supports e-Paper== This is the common guide for all the e-Paper, if you want to get the run command by single e-Paper, please go to the related wiki page. *1.54inch e-Pape...")
(No difference)

Revision as of 12:32, 26 March 2020

Supports e-Paper

This is the common guide for all the e-Paper, if you want to get the run command by single e-Paper, please go to the related wiki page.

Hardware connection

If the e-Paper you have is the HAT version which has 40pin GPIO, you can directly attach the e-Paper HAT on Raspberry Pi, otherwise, you can connect your e-Paper to Raspberry Pi by 8pins cable provided.
To connect the e-Paper, you can following the table below
Connect to Raspberry Pi
e-Paper Raspberry Pi
BCM2835 Board
VCC 3.3V 3.3V
GND GND GND
DIN MOSI 19
CLK SCLK 23
CS CE0 24
DC 25 22
RST 17 11
BUSY 24 18

Enable SPI interface

The communication interface of e-Paper is SPI, to use it, we should firstly enable SPI interface of SPI
Open terminal of Raspberry Pi, and open configuration by the following command
sudo raspi-config
Choose Interfacing Options -> SPI -> Yes
RPI open spi.png
Restart Raspberry Pi
sudo reboot

Install libraries

Open terminal of Raspberry Pi and run the following commands to install corresponding libraries:

  • Install BCM2835 libraries
wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.60.tar.gz
tar zxvf bcm2835-1.60.tar.gz 
cd bcm2835-1.60/
sudo ./configure
sudo make
sudo make check
sudo make install
  • Install WiringPi libraries
sudo apt-get install wiringpi
wget https://project-downloads.drogon.net/wiringpi-latest.deb
sudo dpkg -i wiringpi-latest.deb
gpio -v
  • Install Python2 libraries
sudo apt-get update
sudo apt-get install python-pip
sudo apt-get install python-pil
sudo apt-get install python-numpy
sudo pip install RPi.GPIO
sudo pip install spidev
  • Install Python3 libraries
sudo apt-get update
sudo apt-get install python3-pip
sudo apt-get install python3-pil
sudo apt-get install python3-numpy
sudo pip3 install RPi.GPIO
sudo pip3 install spidev

Download demo codes

Open the terminal of Raspberry Pi and clone demo codes by the following commands:

sudo git clone https://github.com/waveshare/e-Paper
cd ~/e-Paper/RaspberryPi\&JetsonNano/