pyscan paper ink
-
@gael-cobert You assigned P4 to CS. So you can use that in the code, albeit cs is not connected to the display. The display has CS permanently active, since you wired it to GND. You can of course connect teh CS of the display to P4, or use P8, since you already soldered a connector to the bottom. But that seems not the problem here.
-
no flickering at all, no sign of life :p
last photo
https://drive.google.com/file/d/12FfBYLkFZt49QnGn-oToWulc4fcd8lRR/view?usp=sharingis it important to plug the RST cable ?
""" Example for 4.2 inch black & white Waveshare E-ink screen Run on ESP32 """ import epaper4in2 from machine import Pin, SPI # SPIV on ESP32 rst = Pin('P11') dc = Pin('P10') busy = Pin('P15') cs = Pin('P4') clk = Pin('P9') mosi = Pin('P19') spi = SPI(0, mode=SPI.MASTER, baudrate=2000000, polarity=0, phase=0, pins=(clk, mosi, None)) e = epaper4in2.EPD(spi, cs, dc, rst, busy) e.init() w = 400 h = 300 x = 0 y = 0 # -------------------- # use a frame buffer # 400 * 300 / 8 = 15000 - thats a lot of pixels import framebuf buf = bytearray(w * h // 8) fb = framebuf.FrameBuffer(buf, w, h, framebuf.MONO_HLSB) black = 0 white = 1 fb.fill(white) print('print hello world') fb.fill(white) fb.text('Hello World',30,0,black) #fb.pixel(30, 10, black) #fb.hline(30, 30, 10, black) #fb.vline(30, 50, 10, black) #fb.line(30, 70, 40, 80, black) #fb.rect(30, 90, 10, 10, black) #fb.fill_rect(30, 110, 10, 10, black) #for row in range(0,36): # fb.text(str(row),0,row*8,black) #fb.text('Line 36',0,288,black) e.display_frame(buf) # -------------------- -
@gael-cobert RST is required. Did you check that you connected the flat cable between HAT and display the right way around?
Checking the board it seems that the Pinout paper is wrong. The PIN where the white cabel is connected to is actually P10. left to it is P4, right to it P2. The rows in the Pinout are swapped.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login