I wanted to do some proof of concept using a Pycom LoPy4 and a e-paper display (epd2in13_V2).
- Waveshare e-Paper V2 (V2 is important here)
- Pycom LoPy4 (running stock micropython from pycom)
- Waveshare Python driver with my pull request for the MicroPython driver
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.
- Run gen_image.py with the 2in13-v2.bmp test file from the Waveshare repository.
- Upload image.py in flash
Following files goest to flash/lib/waveshare_epd (to be created before)
- waveshare_epd/epd2in13_V2.py
- waveshare_epd/epd2in13_V2.py
- waveshare_epd/__init__.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)