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

Inky update #1

Closed
wants to merge 18 commits into from
Closed

Inky update #1

wants to merge 18 commits into from

Conversation

userhas404d
Copy link

Hey @DurandA thanks for this awesome project!

This PR is my attempt at updating things to use pimoroni's new inky library. I used black to format as I went so that's part of why this PR is touching so much.

I don't have a waveshare so not sure if this breaks things for that implementation.

@DurandA
Copy link
Owner

DurandA commented May 10, 2020

Hi @userhas404d and thanks for the contribution!

My e-ink display is still in my office which is closed right now. I will merge your changes once I am able to test it.

Copy link
Owner

@DurandA DurandA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use single quotes as it was originally. This is mostly a personal preference and recent Python documentation tends to use single quotes.

@DurandA DurandA self-assigned this May 10, 2020
@DurandA
Copy link
Owner

DurandA commented Jun 18, 2020

Hi @userhas404d! I was finally able to retrieve my e-ink module. Unfortunately, the new inky module does not seem to work with the Waveshare HAT by just adjusting the pins.

I will investigate on this issue before merging your PR.

@DurandA
Copy link
Owner

DurandA commented Jun 18, 2020

Here is what Pimoroni wrote on the Inky pHAT product page:

Note that we've completely re-written the Python library (as of October 2018) to be compatible with both Inky pHAT and the larger Inky wHAT displays. This new Inky Python library drops support for the original (V1) Inky pHAT, but you can still use the original Inky pHAT Python library if you have one of these original boards.

Unfortunately, the schematic of these modules is not available so I am not sure if they use a different display.

@userhas404d
Copy link
Author

Unfortunately, the schematic of these modules is not available so I am not sure if they use a different display.

:,( I read through your issue on the upstream library and I understood some of those words.. Worst case scenario recommend maintaining this and the "legacy" codebase on separate branches. 110% your call though.

@DurandA
Copy link
Owner

DurandA commented Jun 23, 2020

Hi @userhas404d!

I packaged this project so it can be installed via pip. This is still in the develop branch. You can use pip install -e to install local project in editable mode to try it out. Would you mind creating a new PR to this branch with your changes?

If most of the code of cli.py can be shared between the inky and inkyphat versions, we can try to pass a flag to use the legacy inkyphat. Otherwise, we can also use two different files in a cli module which is more convenient than managing two branches.

Let me know what you think.

@DurandA
Copy link
Owner

DurandA commented Jun 23, 2020

I imagine we could do something along the lines of:

from inkyphat import set_image, show
class InkyPHAT():
    def __init__(*args):
        pass
    set_image = set_image
    show = show

Then we can use it as if it was the newer library. Since all the drawing is done as Pillow image manipulation, we in fact don't need any other functions besides set_image() and show().

@DurandA
Copy link
Owner

DurandA commented Jun 24, 2020

I repackaged everything in the inky branch. It should now be much easier to integrate your changes. ☺️

@DurandA
Copy link
Owner

DurandA commented May 16, 2022

Hi @userhas404d! Sorry I kind of forgot about this project for a while.

I updated the software and it now uses the inky lib and is more flexible with regard to drivers. Let me know if you have any suggestion.

@DurandA DurandA closed this May 16, 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

Successfully merging this pull request may close these issues.

2 participants