Unicorn Hat Stopped Working


#1

Hello,

I’m not sure why but my unicorn hat has completely stopped working and now returns the following error message:

michael@Daedalus ~/Pimoroni/unicornhat sudo python ./demo.py Can't open device file /tmp/mailbox-2398: No such device or address Can't open device file /tmp/mailbox-2398: No such device or address Can't open device file /tmp/mailbox-2398: No such device or address Traceback (most recent call last): File "./demo.py", line 3, in <module> import unicornhat as unicorn File "/usr/local/lib/python2.7/dist-packages/unicornhat.py", line 13, in <module> ws2812.begin() File "/usr/local/lib/python2.7/dist-packages/neopixel.py", line 107, in begin raise RuntimeError('ws2811_init failed with code {0}'.format(resp)) RuntimeError: ws2811_init failed with code -1 DMA Error: 76c78e00 michael@Daedalus ~/Pimoroni/unicornhat

It was working perfectly up until this evening. I have reinstalled all the software and I have also tried powering down the RPi and removing the hat and then trying to run the same code again and I get the same message. It’s like it can’t detect the hat any more. Any suggestions? I’m using a Pi 2 with the newest version of Raspian and everything seems up to date. Thanks in advance.


#2

I’d guess it’s a software problem, rather than a hardware one, since the software just blindly throws data out of a pin and doesn’t care if you’ve got a HAT connected or not.

I’ll have to investigate and see if I can recreate it. In the meantime, I’m pretty sure a new Raspbian image will get it up and running if you’ve got a spare SD card. A little drastic, but re-imaging generally fixes all woes of this nature.


Unicorn HAT no longer working after Raspbian upgrade
#3

Thanks gadgetoid. I restored to a backup and it’s working fine now. I guess I must have corrupted something in python.