Template: Sunrise X3 Pi for 4.37 e-paper

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 program (skip this step if you have downloaded it).
sudo apt-get install p7zip-full
wget  https://files.waveshare.com/upload/3/39/E-Paper_code.7z
7z x E-Paper_code.7z -O./e-Paper
cd e-Paper/RaspberryPi_JetsonNano/
  • Download the program via GitHub (alternate method, already downloaded can be skipped)
git clone https://github.com/waveshare/e-Paper.git
cd e-Paper/RaspberryPi_JetsonNano/
  • Run the program
# Make sure you are in e-Paper/RaspberryPi_JetsonNano/
cd python/examples/
python3 epd_7in5_V2_test.py