Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MicroPython? #34

Closed
astranome opened this issue Apr 6, 2021 · 5 comments
Closed

MicroPython? #34

astranome opened this issue Apr 6, 2021 · 5 comments

Comments

@astranome
Copy link

Hi, thanks for such a good project!
Just out of curiosity - how difficult (or feasible) is to port your driver under Micropython (esp32 in particular)?

@martinberlin
Copy link

I made a search and seems not to be any Micropython project so far to support parallel epapers on the ESP32.
Would be great to have something but the task seems complicated. If you are interested on how to do it, I highly recommend you to study EPDiy that is the C base library to support this and many other parallel epaper displays.

@ondiiik
Copy link

ondiiik commented May 20, 2021

You can try this one. It has been originaly created as port for TWatch-2020, but after some time I also added support for some other boards. Board name do build correct variant for this EPD is LILYGO_T5_EINK_47. There is module epd with some basic support (can be used with framebuffer module in mode GS4_HMSB).

Just note that there is some issue related to EPD and WiFi. I don't know the real reason, but WiFi can not be used together with EPD. I resolve it by 2 staged boot. When board is woken up from deepsleep, thewn WiFi is connected and all needed stuff is loaded into flash (using littlefs to prevent from erly flash demage caused by often write attempt). When all jobs requiring WiFi are done, then board is rebooted and after reboot it print out all needed on display and go to deepsleep.

@gmorell
Copy link

gmorell commented Jan 12, 2022

@ondiiik Do you have a workaround for the wifi/epd issue or an example of the two stage boot in micropython? I'm curious to see how that works.

@ondiiik
Copy link

ondiiik commented Jan 12, 2022

@ondiiik Do you have a workaround for the wifi/epd issue or an example of the two stage boot in micropython? I'm curious to see how that works.

Unfortunately only workarround I have is to boot twice. First boot activates WiFi and proceed all required communication. Board is then rebooted and results displayed on EPD. After that board goes to deep sleep. To distinguish if you shall activate WiFi or draw on screen you can use machine.reset_cause(). When you get machine.DEEPSLEEP, this means that last boot was about drawing display so now is time for WiFi.

You can have a look here on project building meteostation over this board.

Just one more note: As there is almost no way how to write reasonable amount of data (received by WiFi) which survives reboot, they have to be written into file system. This of course may drain your on board FLASH as this may happen quite often. Therefore I would suggest to use littlefs instead of FAT as it does not drain yor flash that much (and it is even faster in IO operation). Look here to see how to make littlefs on your ESP32 micropython based device.

@LilyGO
Copy link
Contributor

LilyGO commented Apr 7, 2022

Micropython is currently supported, please visit lilygo-micropython.

This issus will be closed, all about micropython, please discuss at lilygo-micropython.

@LilyGO LilyGO closed this as completed Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants