zerowriter / zerowriter1

126 stars 20 forks source link

4in2_V2 Notes #3

Closed jacobsmith closed 4 months ago

jacobsmith commented 6 months ago

Hello,

First, thanks for your work on zerowriter! I recently purchased https://www.amazon.com/dp/B074NR1SW2?psc=1&ref=ppx_yo2ov_dt_b_product_details and received a unit that only works with the 4in2_V2 examples from waveshare. I've updated the code to load the 4in2_V2 EPD code, but obviously that doesn't make use of the faster LUT updates.

I'm going to continue to work on this to hopefully get this version to a useable state as well; I wanted to leave this issue here in case anyone else was working on it and wanted to share advice or code.

Thanks!

jacobsmith commented 6 months ago

I haven't looked much at modifying the LUTs for the V2 screen, but I do have a refactor of the original code that makes it easier to unit test as well as test different scenarios on a laptop without needing the full setup (editing directly on the Zero 2 was getting slow and annoying). It is able to use PIL and tkinter to display the version of the screen on the laptop and should be able to update it to allow real-time typing and such soon. Right now, it's all hardcoded as tests to verify things are working.

image
zerowriter commented 6 months ago

Cool idea! I'll try this out.

For editing on the pi directly, i've been using a SMB server and just mapping the drive and using my desktop editor.

holmesha commented 6 months ago

There is no way to just reference the 4in2 v2 driver?

zerowriter commented 6 months ago

There is no way to just reference the 4in2 v2 driver?

you can drop in the 4in2v2.py driver file from waveshare https://github.com/waveshareteam/e-Paper/blob/master/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd4in2_V2.py

but you'd have to change a few lines of code in the zerowriter main.py program that reference the driver.. (line 21: from waveshare_epd import new4in2part)

and the implementation is a bit different for the v2 driver -- in particular the way they reference partial updates and initializing the display (display_Partial)

also the V2 driver lookup tables are defaults so probably slow. they likely would need to be modified, which i could help with, but i don't have a V2 board to play around with yet.

so the short answer is: no, a drop-in driver won't work, you'd have to tweak the code a bit.

zerowriter commented 4 months ago

https://github.com/zerowriter/zerowriter1/tree/waveshare_2.2

a rev 2.2 branch