Template: 2.13inch e-Paper HAT (B) Sunrise

From Waveshare Wiki
Jump to: navigation, search

Working With Sunrise X3 Pi

Hardware Connection

When connecting the Sunrise X3 Pi, you can directly insert the board into the 40PIN pin header of the Sunrise X3 Pi, and pay attention to the correct pins.
If you choose to connect with an 8PIN cable, please refer to the pin correspondence table below:

Connect to Sunrise X3 Pi
E-Paper Sunrise X3 Pi
BCM 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

  • SPI is enabled by default. If you have disabled it, you can enable it by following the steps below.
  • Enter the command: sudo srpi-config

Enable-SPI0.jpg
Enable-SPI.jpg
Enable-SPI2.jpg

Python

  • The corresponding library has been installed in the function. If you uninstall it accidentally, please use the following command to install it.
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 Hobot.GPIO
sudo pip install spidev
  • Download the demo via GitHub (skip this step if you have downloaded it).
git clone https://github.com/waveshare/e-Paper.git
cd e-Paper/RaspberryPi_JetsonNano/
  • Download the demo (skip this step if you have downloaded it).
wget https://files.waveshare.com/upload/7/71/E-Paper_code.zip
unzip E-Paper_code.zip -d e-Paper
cd e-Paper/RaspberryPi_JetsonNano/
  • Run the demo:
# Make sure you are in e-Paper/RaspberryPi_JetsonNano/
cd python/examples/
python3 epd_2in13b_V4_test.py