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

display orientation upside down #43

Open
mnishiguchi opened this issue Nov 8, 2021 · 5 comments
Open

display orientation upside down #43

mnishiguchi opened this issue Nov 8, 2021 · 5 comments
Labels
paused On hold

Comments

@mnishiguchi
Copy link
Contributor

mnishiguchi commented Nov 8, 2021

The display orientation is upside down compared to how Pimoroni uses Inky. It is fine when we use Inky standalone, but a problem may arise when we want to use something like Adafruit CYBERDECK Bonnet for Raspberry Pi 400.

It would be nice if the orientation is consistent with Pimoroni's settings, but probably it will require some breaking changes, meaning users existing code for Inky will be upside down suddenly.

This library
Pin header at the bottom

Pimoroni (pimoroni/inky)
Pin header at the top

Adafruit CYBERDECK Bonnet for Raspberry Pi 400
Pin header at the top

@mnishiguchi
Copy link
Contributor Author

It seems like possibly all it takes is flipping the negative/positive sign.

Screen Shot 2021-11-08 at 8 53 05 AM

@nyaray
Copy link
Collaborator

nyaray commented Nov 9, 2021

Flipping the rotation shouldn't do anything with your display, the default rotation is 0, I'm not sure why you're seeing a flipped rotation have an effect.

Have you verified that they have not drawn upside down pictures in their product photos? I'm wondering if this is an issue for us or not, since someone working with the pimoroni code will be working in another language anyway.

@mnishiguchi
Copy link
Contributor Author

mnishiguchi commented Nov 9, 2021

Honestly, I do not know what is going on, but I am just following the manufacturer's examples code and the same logic did not work. It is not side effect. The two libraries interpret coordinates differently and I was confused as a Display beginner.

Yeah if we see this library just different, then the user just needs to get used to it. It is more about a decision than an issue. I personally resolved this by the - in my fork (so I am happy 😄 ) but for the library it depends on what is required.

https://learn.pimoroni.com/article/getting-started-with-inky-phat
https://github.com/pimoroni/inky/blob/master/examples/name-badge.py

@nyaray
Copy link
Collaborator

nyaray commented Nov 9, 2021

Honestly, I do not know what is going on, but I am just following the manufacturer's examples code and the same logic did not work. It is not side effect. The two libraries interpret coordinates differently and I was confused as a Display beginner.

Hm, I think I found that your SSD1608 implementation defaults to 90 degrees, which also makes it clear why there wasn't a problem with the width/height vs rows/cols I commented about earlier. Two wrongs made a right, unless I'm having a brain fart moment, hehe.

Yeah if we see this library just different, then the user just needs to get used to it. It is more about a decision than an issue. I personally resolved this by the - in my fork (so I am happy smile ) but for the library it depends on what is required.

https://learn.pimoroni.com/article/getting-started-with-inky-phat https://github.com/pimoroni/inky/blob/master/examples/name-badge.py

Yeah, it's worth thinking about what the default orientation should be. @lawik do you remember if we talked about this? I kind of remember that "default is whatever the hardware says" was a comment made at some point, but this issue points out why that might be an issue. Worth thinking about a bit, I guess!

@mnishiguchi
Copy link
Contributor Author

@lawik Here is my livebook notebook I used for the name badge example. It is my current best based on all the techniques I learned from your Youtube video. https://gist.github.com/mnishiguchi/7acf189376a4c5ffa184c39372cafbf4

@nyaray nyaray added the paused On hold label Nov 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
paused On hold
Projects
None yet
Development

No branches or pull requests

2 participants