Search code examples
displayesp32spimicropython

Micropython code displaying red-white noise on 1.54" ePaper display


I have the following code in micropython that is running on my Espressif ESP32-PICO-KIT. To this I have attached a WaveShare 1.54" ePaper display (supporting red color).

When I reach the last line the display updates in waves, but I only get white-red noise on the display.

I'm using the driver from mcauser/micropython-waveshare-epaper on Github.

This is my code:

from machine import Pin, SoftSPI
import epaper1in54b

miso = Pin(19)
sck = Pin(18) # yellow 
mosi = Pin(23) # white 

cs = Pin(5) # green
dc = Pin(25) # gray
rst = Pin(21) # orange
busy = Pin(19) # gray

spi = SoftSPI(baudrate=20000000, polarity=0, phase=0, sck=sck, mosi=mosi, miso=miso)
e = epaper1in54b.EPD(spi, cs, dc, rst, busy)

e.init()

w = 200
h = 200
x = 0
y = 0


import framebuf
buf = bytearray(w * h // 8)
fb = framebuf.FrameBuffer(buf, w, h, framebuf.MONO_VLSB)
black = 0
white = 1
red = 2
fb.fill(white)
fb.text('Hello world!', 0, 0,black)
e.display_frame(buf,None)

The result

Result

Update:

I'm using MicroPython v1.16 on 2021-06-18; ESP32 module with ESP32.

Please note that I did file a new issue in the mcauser/micropython-waveshare-epaper repository.


Solution

  • I did get an answer on an issue, which I opened over at Github

    I faced with same problem. This library does not fit new displays.

    This library version - 1.54" Black/White/Red GDEW0154Z04 e-paper display driver

    Current Eink fw version GDEH0154Z90.

    Protocol is changed/ Check the pdf https://v4.cecdn.yun300.cn/100001_1909185148/GDEH0154Z90-0111.pdf

    It was easier for me to write new driver. Found few cpp libraries. https://github.com/ZinggJM/GxEPD2/blob/3ecef6f63b8fce27bf8c6dbb399a5dfb768a568f/src/epd3c/GxEPD2_154_Z90c.cpp https://github.com/martinberlin/cale-idf/blob/master/components/CalEPD/models/color/gdeh0154z90.cpp

    So it seems that I have the wrong hardware for this library.