Introduction: Waveshare EPaper 1.54 Raspberry Pi
I bought an Waveshare E-Paper 1.54 for a different project so.. here a guide on how to install it
Step 1: Item List
Here is what you'll need:
- a Raspberry pi 3
- remote machine to SSH to the pi or a screen and keyboard to connect to it directly
- WaveShare E-paper module 1.54 (model A)
Step 2: Connecting to the PI
Follow the cable name and the drawing when connecting the screen to the Raspberry pi IO
Step 3: Download and Install Library
I have added the library download files to the project, original links are below
https://www.waveshare.com/wiki/File:Bcm2835-1.39.t...
https://www.waveshare.com/wiki/File:WiringPi.tar.g...
Installation
Enter WiringPi folder, then follow these commands to install:
chmod 777 build ./build
check the installation with :
gpio –v
Go to the bcm2835 libraries folder, then follow these commands to install:
<p>./configure<br>make sudo make check sudo make install</p>
Download the demo code
remake the files in bcm2835 and wiringpi folder by going to the folder and do
cd PATH/OF/DEMO/FOLDER/Rasberry/bcm2835<br>make clean make <p>cd PATH/OF/DEMO/FOLDER/Rasberry/wiringpi</p><p>make clean make</p>
Step 4: Update Your Own Image
Before you can run the code you need to make minor changes .
The code uses a font the is not nativly on the Rasbien instell so change the font type
font = ImageFont.truetype('/usr/share/fonts/truetype/wqy/wqy-microhei.ttc', 24)
to any other font that exist on your system.
check available font by doing and change the result , i have changed it to
ls /usr/share/fonts/truetype/
font = ImageFont.truetype('/usr/share/fonts/truetype/freefont/FreeSansBold.ttf', 24)<br>
in main.py
<p>image = Image.open('free-rick-design-700x700.bmp')</p><p>epd.display(epd.getbuffer(image)) time.sleep(2)</p>
Step 5: Change the Demo Code
From the Example file in the demo here are some command you can use inside your own python scripts
import the install interface
import epd1in54<br>from PIL import Image,ImageDraw,ImageFont
Init the Screen
epd = epd1in54.EPD() epd.init(epd.lut_full_update) epd.Clear(0xFF)
Open and Display an image
image = Image.open('1in54.bmp')<br>epd.display(epd.getbuffer(image))