Unicorn HAT Mini - get_pixels?

Hi there,

I used to own the Unicorn pHAT and loved the function of “get_pixels” which showed me the current pixels in use. Is there any way to get any of the get_ functionality in the Unicorn HAT Mini? Some of the functionality looks limited compared to is predecessors.

It doesn’t look like it has a function for that, but you might be able to pull it out of the object directly.

The constructor creates an attribute called disp:

self.disp = [[0, 0, 0] for _ in range(_COLS * _ROWS)]

You might be able to try something like:

from unicornhatmini import UnicornHATMini
unicornhatmini = UnicornHATMini()

That’s probably going to be horribly formatted, but you’ll be able to work with it from there.

The Mini uses SPI whereas the pHat uses just the 1 data pin. Totally different in how they get it done. The Mini actually uses SPI0 and SPI1, each feeding one of the two LED matrix driver chips. Just a FYI post as to why the functions are so different. I’m thinking its no easy feat to make them similar in use.
I have a MINI and like it a lot. I don’t have a pHat though. I also have a couple of the Unicorn Hat HD’s. Also like those a lot.

Unicorn pHAT at Raspberry Pi GPIO Pinout

Unicorn HAT Mini at Raspberry Pi GPIO Pinout