Dear Pimoroni,
I got a non uniform light coming out of my HAT, only for the red component
In green and blue the LED are uniformly shining.
Do I miss something or is it a possible defect?
I installed the library with:
sudo apt-get install python3-pip python3-dev python3-spidev
sudo pip3 install unicornhathd
And did run
sudo raspi-config nonint do_spi 0
sudo reboot
And i use the following code with python 3.9:
import logging
import time
import numpy
import unicornhathd
logging.getLogger().setLevel(logging.DEBUG)
timefull = 25
unicornhathd.brightness(0.5)
shp = unicornhathd.get_shape()
logging.debug("Shape of the array is: {}".format(shp))
colors = [[255, 0, 0], [0, 255, 0], [0, 0, 255]]
for color in colors:
for ix, iy in numpy.ndindex(shp):
unicornhathd.set_pixel(ix, iy, *color)
unicornhathd.show()
time.sleep(timefull)
unicornhathd.clear()
And I forgot to say
Rasperry Pi 3B or 3B+
With latest Bullseye OS
Best
After testing another Raspberry Pi I still get a non uniform red output.
This is my test code for the HD. Might be worth running it to see if you get the same weirdness with red?
#!/usr/bin/env python
import time
import unicornhathd
unicornhathd.brightness(0.6)
while True:
unicornhathd.clear()
unicornhathd.set_all(255, 0, 0)
unicornhathd.show()
time.sleep(10)
unicornhathd.clear()
unicornhathd.set_all(0, 255, 0)
unicornhathd.show()
time.sleep(10)
unicornhathd.clear()
unicornhathd.set_all(0, 0, 255)
unicornhathd.show()
time.sleep(10)
unicornhathd.clear()
unicornhathd.set_all(255, 255, 255)
unicornhathd.show()
time.sleep(10)
Nope same issue
(was not aware of this set_all() function, but it is relatively the same as my code)
Here is a picture of the white light in your test code, you can see some LED are more blue than other (because of the lack of the red)
Else here is some picture with only two LED on.
You can see the difference (not easy, but the left LED is Brighter than the right one).
Sorry I didn’t reply sooner. It looks like a hardware issue to me. There is a link on the shop page to contact tech support about it.
Contact Us for Raspberry Pi Technical Support - Pimoroni
Thanks for your guidance
Have a great day