Difference between revisions of "Waveshare E-Paper Displays"
Line 31: | Line 31: | ||
=== Waveshare e-paper display python library === | === 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 2.13 inch display | ||
from waveshare_epd import epd2in13bc # for 7.5 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 = epd2in13bc.EPD() # for 2.13 inch display | ||
epd = epd7in5bc.EPD() # for 7.5 inch display | epd = epd7in5bc.EPD() # for 7.5 inch display | ||
epd.init() | This allows us to use the basic e-paper display functions. | ||
epd.Clear() | |||
epd.sleep() | epd.init() # to intialize the display | ||
epd.Clear() # | |||
epd.sleep() # | |||
epd.display(epd.getbuffer(BlackImage), epd.getbuffer(RedYelloyImage)) | epd.display(epd.getbuffer(BlackImage), epd.getbuffer(RedYelloyImage)) |
Revision as of 15:00, 22 October 2020
Summary
This documentation addresses the Waveshare E-Paper Displays of all sizes.
Requirements
- Hardware: Raspberry Pi
- Operating system: Rasbian
- Interpreter: Python3
Description
Devices
epd 7,5 inch black and red:
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:
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.
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
- Waveshare ePaper Display HAT f Raspberry Pi dreifarbig 2.13"
- Waveshare ePaper Display HAT f Raspberry Pi dreifarbig 7.5"
- Raspberry Pi 3, Model B+, WLAN, BT