Playing with e-paper and Micropython

 · Jean Schurger
Table of contents

I wanted to do some proof of concept using a Pycom LoPy4 and a e-paper display (epd2in13V2).

Hardware

Software

Testing

The MicroPython provided by pycom does not have the PIL (or Pillow) package. So to run my test I crafted the "image" to display outside the controller (on my computer) and just imported the generated python code.

Get and upload the image.py

  • Run genimage.py with the 2in13-v2.bmp test file from the Waveshare repository.
  • Upload image.py in flash

Upload the driver from Waveshare (with my PR to get MicroPython

implementation)

Following files goest to flash/lib/waveshareepd (to be created before)

  • waveshareepd/epd2in13V2.py
  • waveshareepd/epd2in13V2.py
  • waveshareepd/init.py

Upload the main.py

In /flash/main.py

from waveshare_epd import epd2in13_V2
from image import image

epd = epd2in13_V2.EPD()
epd.init(epd.FULL_UPDATE)
epd.Clear(0xFF)
epd.display(image)