Unicorn HAT - set_all method not working


#1

According to the official documentation, there should be a set_all method.

unicornhat.set_all(r, g, b)

If I try
unicornhat.set_all(255,0,0)
I get the following error message:

AttributeError: ‘module’ object has no attribute ‘set_all’

Was the set_all method removed?


Set_all() is missing from the UnicornHAT
#2

set_all exists, but is apparently not in the pip release (it was added quite recently). We’ll be pushing a new version out soon that should fix that plus some other things.

You could try:

unicornhat.shade_pixels(lambda x, y: (r, g, b))

#3

Cool. Thanks. Any hints as to what those “other things” are?


#4

Mostly I just want to get shot of our custom version of the library that drives the pixels, so it’s less confusing for more advanced users and can take advantage of some of the new features for driving pixels with alternate pins ;D

Nothing exciting I’m afraid.