hyperpixel4 icon indicating copy to clipboard operation
hyperpixel4 copied to clipboard

Love this screen, but I don't like GUI's

Open snarflakes opened this issue 4 years ago • 6 comments

Forums directed me here. I'm oldschool. I code for the raspberry pi at the NON-GUI command line in python3 directly to my SPI display using PIL,PILLOW. Can I do that with this screen? I can't tell if there are any modules that I can import so I can just code in python3 to directly display directly to this screen and not have to boot to the GUI or run program through the GUI.

many thanks, Snarflakes

snarflakes avatar Aug 15 '21 00:08 snarflakes

You can use Pygame to render directly to the screen but I've had mixed results doing this from the command-line. This is mostly because the drivers and version of SDL aren't quite there in Raspberry Pi OS yet.

Here's me chasing those kinds of issues with our 480x480 pixel "round" display - https://github.com/pimoroni/hyperpixel2r-python/issues/2

You can probably draw inspiration from the Hyperpixel2r Python examples, but for touch input you'd probably use Pygame's mouse support directly rather than the (incompatible with Hyperpixel 4 anyway) touch driver in this repository.

Gadgetoid avatar Aug 19 '21 11:08 Gadgetoid

Hi thanks! Pimoroni help desk just emailed me this:


Yes, it should be. If you install the drivers and then edit /boot/config.txt to either comment out or remove the line: dtoverlay=hyperpixel4 That should leave you with the software installed and the Pi using the default display. You can then specify display DSI-1 in PIL to output to the Hyperpixel.

Kind regards,

snarflakes avatar Aug 19 '21 15:08 snarflakes

Hi thanks! Pimoroni help desk just emailed me this:

Yes, it should be. If you install the drivers and then edit /boot/config.txt to either comment out or remove the line: dtoverlay=hyperpixel4 That should leave you with the software installed and the Pi using the default display. You can then specify display DSI-1 in PIL to output to the Hyperpixel.

Kind regards,

Does somebody have tried this ? I would love to have an answer to this before buying the screen !

Thx :)

Sebwap avatar Sep 07 '21 12:09 Sebwap

I am interested in this as well. In my use case, I'll be generating images that I will want to push to the display every few minutes. Basically as a status board with date time, weather and some key metrics. I guess I could make that work with using xorg, skipping login and running on program full screen but I'd rather just build the image and push it to the display if possible.

fireduck64 avatar Nov 24 '21 18:11 fireduck64

Also curious about this use case; our code base uses Pillow and would like to verify that works before digging in. Not interested in replicating a standard Pi GUI desktop.

SeedSigner avatar Dec 09 '21 02:12 SeedSigner

Just in case it helps anyone else, I've found that if you follow the instructions in this repo for driver installation, then the hyperpixel will be the console output of the Pi. From there, you can install a program called 'fim' and use it to display images to the hyperpixel. Example: fim -q 720.png

The -q makes it now show data about the image and just the raw image itself. This seems to work, with the limitation that any system kernel logs overwrite the image a bit, but if you are refreshing occasionally that shouldn't be a big problem.

My plan is to have some other processes that output a new image formatted for the screen size and then occasionally kill and restart fim to update the screen. This works for my use case, which is data that changes at most every few minutes.

fireduck64 avatar Dec 13 '21 20:12 fireduck64