mcauser / micropython-waveshare-epaper

MicroPython drivers for Waveshare e-paper modules
MIT License
309 stars 79 forks source link

Displaying red-white noise on 1.54" ePaper display #17

Open besi opened 2 years ago

besi commented 2 years ago

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 could (a few years ago) use the same hardware for a test using the Arduino platform.

This is my code:

from machine import Pin, SoftSPI
import epaper1in54b

miso = Pin(9) # not connected
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

Any help would be appreciated.

Im using MicroPython v1.16 on 2021-06-18; ESP32 module with ESP32

Dexdev08 commented 2 years ago

did you get this to work? I just got a watchy with a display and i'm trying to use this library too. too much of a noob.

akelix commented 2 years ago

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

Dexdev08 commented 2 years ago

what is your plan for your new driver?