5.65inch e-Paper Pi
Working With Raspberry Pi
Provide BCM2835, WiringPi, file IO, RPI (Python) library demos.
Hardware connection
When connecting the Raspberry Pi, if the driver board has a 40pin header, you can directly plug it into the 40PIN header of the Raspberry Pi, and pay attention to the pins. If you choose to connect with an 8PIN cable, please refer to the pin correspondence table below
For the 1.02inch e-paper Module, the pin header is used, and the wiring needs to be connected according to the following table
e-Paper | Raspberry Pi | |
BCM2835 encoding | Board physical pin number | |
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 |
Take the 7.5inch HD e-Paper (B) connected to the e-paper Driver HAT as an example, just plug it directly into the Raspberry Pi:
Enable SPI Interface
- Open the Raspberry Pi terminal and enter the following command in the config interface:
sudo raspi-config Choose Interfacing Options -> SPI -> Yes Enable SPI interface
Then reboot your Raspberry Pi:
sudo reboot
- Check /boot/config.txt, and you can see 'dtparam=spi=on' was written in.
- To make sure SPI is not occupied, it is recommended to close other drivers' coverage. You can use ls /dev/spi* to check whether SPI is occupied. If the terminal outputs /dev/spidev0.1 and /dev/spidev0.1, SPI is not occupied.
Install Library
Install BCM2835
#Open the Raspberry Pi terminal and run the following command wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.71.tar.gz tar zxvf bcm2835-1.71.tar.gz cd bcm2835-1.71/ sudo ./configure && sudo make && sudo make check && sudo make install # For more information, please refer to the official website: http://www.airspayce.com/mikem/bcm2835/
- Install WiringPi
#Open the Raspberry Pi terminal and run the following command: sudo apt-get install wiringpi #For Raspberry Pi systems after May 2019 (Earlier than the previous can not be implemented), an upgrade may be required to: wget https://project-downloads.drogon.net/wiringpi-latest.deb sudo dpkg -i wiringpi-latest.deb gpio -v #Running gpio -v will bring up version 2.52, if it doesn't, it means there was an installation error. #The Bullseye branch system uses the following command: git clone https://github.com/WiringPi/WiringPi cd WiringPi ./build gpio -v # Run gpio -v and version 2.60 will appear, if it does not appear, it means there is an installation error
- Download program (already downloaded can be skipped):
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/
- Downloading the program via GitHub (alternate method, you can skip it if you've already downloaded it).
Access to GitHub is not very smooth at the moment, so we recommend downloading from our website using the method above.
git clone https://github.com/waveshare/e-Paper.git cd e-Paper/RaspberryPi_JetsonNano/
Compile the program (Note: -j4 is compiled using 4 threads, the number can be modified; EPD=epd1in02d is to specify a macro definition, epd1in02d corresponds to the test program in the main function).
# At this point in the e-Paper/RaspberryPi_JetsonNano cd c sudo make clean sudo make -j4 EPD=epd1in02d
- Run the demo:
sudo ./epd
Run Python Library
- Install Python Library:
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
- Install the function library (Python2)
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
- Download the program: (already downloaded can be skipped):
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/
- Downloading the program via GitHub (alternate method, you can skip it if you've already downloaded it).
Access to GitHub is not very smooth at the moment, so we recommend downloading from our website using the method above.
git clone https://github.com/waveshare/e-Paper.git cd e-Paper/RaspberryPi_JetsonNano/
- Run the program:
# Make sure in the e-Paper/RaspberryPi_JetsonNano/ cd python/examples/ python3 epd_1in02_test.py