Playing with e-paper and Micropython
Table of contents
- Get and upload the image.py
- [[#upload-the-driver-from-waveshare-with-my-pr-to-get-micropython-implementation][Upload the driver from Waveshare (with my PR to get MicroPython implementation)]]
- Upload the main.py
I wanted to do some proof of concept using a Pycom LoPy4 and a e-paper display (epd2in13V2).
Hardware
- Waveshare e-Paper V2 (V2 is important here)
- Pycom LoPy4 (running stock micropython from pycom)
Software
- Waveshare Python driver with my pull request for the MicroPython driver
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)