PiSupply / PaPiRus

Resources for PaPiRus ePaper eInk displays
https://www.pi-supply.com/product/papirus-epaper-eink-screen-hat-for-raspberry-pi/
Other
346 stars 88 forks source link

Invert display so the Pi can have any orientation #90

Closed mashedkeyboard closed 7 years ago

mashedkeyboard commented 7 years ago

I'd love to be able to use PaPiRus with my Pi Zero "upside down" as considered by the PaPiRus HAT - with the text being displayed the right way up.

Could we have a "setOrientation()" in a future build?

shawaj commented 7 years ago

Related to #84

shawaj commented 7 years ago

In framebuffer / fbtft this can be done by specifying clockwise rotations from standard - 90, 180, 270 - think this would be our best bet

3DJupp commented 7 years ago

i would like to have an option which allows me to rotate the screen by 180° (to attach the RPi Zero W to the Wall and to have the cable running underneath)

shawaj commented 7 years ago

Yes this is a very good idea for sure. We will definitely look into it.

On 20 Mar 2017 12:31 am, "Dominic Spatz" notifications@github.com wrote:

i would like to have an option which allows me to rotate the screen by 180° (to attach the RPi Zero W to the Wall and to have the cable running underneath)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/PiSupply/PaPiRus/issues/90#issuecomment-287660658, or mute the thread https://github.com/notifications/unsubscribe-auth/ADNCuv5_kPwI-iZx_hREwATm6emJ4pyRks5rncjdgaJpZM4MhAdz .

3DJupp commented 7 years ago

Hey @shawaj Now, since the PaPiRus is working with the latest kernel on my Pi Zero W, I would like to have the correct orientation on my ePaper. Is there any way to do this before: image.write? I only display Text right now, so inverting the font would be to complicated. Instead: Displaying an image could easily be manipulated.

shawaj commented 7 years ago

Do you need to write text on the fly?

Otherwise​ you could generate images, save then upside down, and send to screen?

On 24 Mar 2017 8:15 am, "Dominic Spatz" notifications@github.com wrote:

Hey @shawaj https://github.com/shawaj Now, since the PaPiRus is working with the latest kernel on my Pi Zero W, I would like to have the correct orientation on my ePaper. Is there any way to do this before: image.write? I only display Text right now, so inverting the font would be to complicated. Instead: Displaying an image could easily be manipulated.

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/PiSupply/PaPiRus/issues/90#issuecomment-288959463, or mute the thread https://github.com/notifications/unsubscribe-auth/ADNCuoPLm45CByfBkVf78S9F4YhhL0PCks5ro3udgaJpZM4MhAdz .

3DJupp commented 7 years ago

Thats my code: https://github.com/Dom1n1c/PaPiRus-MQTT/

shawaj commented 7 years ago

What does the code do? If you want it included in the PaPiRus repository can you submit a PR

Thanks

On 25 Mar 2017 2:15 pm, "Dominic Spatz" notifications@github.com wrote:

Thats my code: https://github.com/Dom1n1c/PaPiRus-MQTT/

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/PiSupply/PaPiRus/issues/90#issuecomment-289214364, or mute the thread https://github.com/notifications/unsubscribe-auth/ADNCuuj2guR18swbKb0RsYGuqNEftvt2ks5rpSF4gaJpZM4MhAdz .

3DJupp commented 7 years ago

it listens for mqtt topics and then it'll print them to the display 😄 Here you can find a picture of the PaPiRus Zero running this script https://community.openhab.org/t/using-an-epaper-eink-display-as-energy-temperature-monitor-mqtt/16954/2

3DJupp commented 7 years ago

Any news on rotating the screen (changing the orientatiion)?

Thanks :)

francesco-vannini commented 7 years ago

Hi @Dom1n1c, I believe that would in fact require some work on the EPD driver what do you think @tvoverbeek ?

tvoverbeek commented 7 years ago

@Dom1n1c @francesco-vannini No need to modify the repaper/gratis driver. Should be possible to handle this on the python side using the PIL library. But requires careful splitting of physical screen coordinates and size (post rotation) and virtual screen coordinates and size (pre rotation). 180 deg should be easier (no change in screen height and width), 90 and 270 requires more work

quavoce commented 7 years ago

I too would really like this feature please. My use case would be to have dynamically updating text aligned next to the buttons on a PiZero, in portrait mode with the 2″ diagonal (200 x 96 resolution) display (or the larger ones too which would have more space for portrait text). If I could write text in portrait mode (90 degrees), I would position the text using x/y values. I do realise I could use multiple images for each button status, but having dynamic text would be easier. Thanks!

tvoverbeek commented 7 years ago

See my PR #119 Hopefully will get merged soon. Otherwise clone my repository

quavoce commented 7 years ago

Brilliant! Can't wait to try this out, thank you!

shawaj commented 7 years ago

Think @francesco-vannini was playing with this but got distracted with some other stuff at tail end of last week. Will get it merged this coming week :-)

francesco-vannini commented 7 years ago

We are reviewing a PR for this and we are aiming to merge next week.

On 14 May 2017 11:32 a.m., "quavoce" notifications@github.com wrote:

I too would really like this feature please. My use case would be to have dynamically updating text aligned next to the buttons on a PiZero, in portrait mode with the 2″ diagonal (200 x 96 resolution) display. If I could write text in portrait mode (90 degrees), I would position the text using x/y values. I do realise I could use multiple images for each button status, but having dynamic text would be easier. Thanks!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/PiSupply/PaPiRus/issues/90#issuecomment-301303633, or mute the thread https://github.com/notifications/unsubscribe-auth/APUu1yOexBZk32jlVysyQO_Kcx6aP-B9ks5r5thZgaJpZM4MhAdz .

francesco-vannini commented 7 years ago

Sorted in #119