Waveshare E-Paper Displays

From Embedded Lab Vienna for IoT & Security
Jump to navigation Jump to search

Summary

This documentation addresses the Waveshare E-Paper Displays of all sizes.

Requirements

  • Hardware: Raspberry Pi
  • Operating system: Rasbian
  • Interpreter: Python3

Description

Calendar Application on E-Paper Display

Devices

epd 7,5 inch black and red:

116-displaypng.png

This display has a diagonal length of 7,5 inch. The e-paper display has an equivalent of 640 by 384 Pixel that can be set to either white, black or red. For more information to this particular device look at Wavesshares Wiki webpage.

epd 2,13 inch black and red:

115-213inch-e-paper-hat-b-5-1jpg.jpg

This display has a diagonal length of 2,13 inch. The e-paper display has an equivalent of 212 by 104 Pixel that can be set to either white, black or red. For more information to this particular device look at this Wavesshares Wiki webpage.

Usage

This devices can be operated via a wide variety of devices like a Raspberry Pi or a STM32 or and Arduino. The manufacturer published a github repository to provide a libraries e-paper display for a wide range of programming languages. The github repository can be found under this link. This repo also provide example programs for both of this devices in the directory e-Paper/RaspberryPi&JetsonNano/python/examples. With the smaller display the epd_2in13bc_test.py runs the example program, where as the epd_7in5bc_test.py runs the test program for the 7,5 inch display.

Waveshare e-paper display python library

Firstly the Class of the corresponding Display needs to be imported as well as some functions from the Pillow library.

from waveshare_epd import epd2in13bc        # for 2.13 inch display
from waveshare_epd import epd2in13bc        # for 7.5  inch display
from PIL import Image,ImageDraw,ImageFont
import traceback
import logging

Then an instance of the class needs to constructed for further usage of the epd functions.

epd = epd2in13bc.EPD()                      # for 2.13 inch display
epd = epd7in5bc.EPD()                       # for 7.5  inch display

This allows us to use the basic e-paper display functions.

epd.init()                                  # to intialize the display
epd.Clear()                                 # 
epd.sleep()                                 #
epd.display(epd.getbuffer(BlackImage), epd.getbuffer(RedYelloyImage))

Used Hardware

References