New Unicorn Hat not working

Thanks for the hint. However, meanwhile I swapped the Hat with the pHat which works without any problems right from the beginning.

Thanks for your help so far, but I’m sorry to say your fix for the error code -1 did not work for me. I tried running your command after a fresh install, but still got the same error. I also looked at the comments for the similar error posted on github that you linked and could understand their reasoning for the error and even saw that another user linked files for a supposed fix, but in trying to install those files I got lost on how to put them on my device as I could not see a setup.py to run. Also, out of curiosity I have a question as to how RogueM supposedly had it working on his devices as stated above. Was he using an outdated version of the driver or was the whole Unicorn Hat package outdated? If his success was due to an outdated package, would linking one be possible? I understand the answer to these questions are probably no as he did state he was using a clean but updated Jessie, meaning it should be the same as mine, but I’m just puzzled as to why his is working and not mine.

Again, thanks for help so far and sorry your fix didn’t work. Hope to hear back from you soon.

To answer the question regarding the setup I was running at the time I posted, this would have been my day-to-day Jessie based Pi3 as well as the same Pi with a clean SD imaged with fresh Jessie available at the time (which has now been superseded).

I then checked on a Pi2 and B+ using the same clean fresh SD. All those tests were within a X session, at the terminal, and using the latest libs available, not a prior version. Lib install via one-line installer, which means pip supplied version, and all known requirements fed from repo as the script enforces.

… my last tests involved a mod of the unicorn lib itself, targeting pin 17 instead of 18 (ran into error) and as I recall pin 12 (no error) hence my suggestion that pin 18 is not responding as expected to the library probe, which seems in line with @gadgetoid detective work at first glance.

Still, I have no idea why it would work for me on what seems to be as identical a setup as those who ran into issues. Colour me confused too. I’m away until the weekend so won’t be able to try the latest Raspbian + rpi_ws281x until then.

I’ve just successfully run Unicorn HAT on a fresh install of the latest full Jessie version, installing the Unicorn HAT library with curl https://get.pimoroni.com/unicornhat | bash, modifying the /boot/config.txt as above, and then rebooting. This was on a brand new Pi Zero.

@traptest it might be worth trying to clear out old versions of the library first, perhaps. It also depends if you’re using Python 2.x or 3.x since “pip install” will only update the library for 2.x.

If you’ve got a revision 0x13, Model B+ then this fix will certainly be the one you’re looking for. Try running the following to see what revision you’re running:

cat /proc/cpuinfo | grep Revision

You can try reinstalling the library for Python 2 and 3 like so:

sudo pip uninstall rpi_ws281x
sudo pip3 uninstall rpi_ws281x
sudo pip install rpi_ws281x
sudo pip3 install rpi_ws281x

@gadgetoid OK, so I don’t have totally good news in that the Python driver library re-installs did not get the Unicorn Hat command to resolve its same error code -1, but in running the Revision command I found out that I do not indeed have a revision 0x13 but instead a 0x10 which I would assume is quite outdated and probably the first revision. Hopefully this difference in revisions has been the culprit to my troubles all along and with this new information you can better be lead to uncover why the command is not working on my device. Revision 0x10 is supported and compatible with the Unicorn Hat, right? I would hope that all this trouble was not for a silly mistake on my part for not realizing that my revision is incompatible. Thanks again for your fast replies and new suggestions. Below will be an output of the cat /proc/cpuinfo command. Hopefully it helps.

pi@raspberrypi:~ $ cat /proc/cpuinfo
processor : 0
model name : ARMv6-compatible processor rev 7 (v6l)
BogoMIPS : 2.00
Features : half thumb fastmult vfp edsp java tls
CPU implementer : 0x41
CPU architecture : 7
CPU variant : 0x0
CPU part : 0xb76
CPU revision : 7

Hardware : BCM2708
Revision : 1000010

@traptest now I’m only more confused! Revision 0x10 is the original revision of the Model B+, and 0x13 is the same B+ but with a v1.2 PCB revision. Both should be compatible with Unicorn HAT.

Your Pi is absolutely compatible, but something else is clearly afoot. It’s likely the ws2811_init failed with code -1 RuntimeError is masking more than one underlying problem, and we’ve been barking up the wrong tree.

What do you see if you run:

uname -a

And:

cat /etc/os-release

@gadgetoid I’ve listed the output of the two commands below.

pi@raspberrypi:~ $ uname -a
Linux raspberrypi 4.1.19+ #858 Tue Mar 15 15:52:03 GMT 2016 armv6l GNU/Linux
pi@raspberrypi:~ $ cat /etc/os-release
PRETTY_NAME=“Raspbian GNU/Linux 8 (jessie)”
NAME=“Raspbian GNU/Linux”
VERSION_ID=“8”
VERSION=“8 (jessie)”
ID=raspbian
ID_LIKE=debian
HOME_URL=“http://www.raspbian.org/
SUPPORT_URL=“http://www.raspian.org/RaspbianForums
BUG_REPORT_URL=“RaspbianBugs - Raspbian

I’ve just set up a Model B, revision 0x10, with the latest Raspbian Jessie and it works fine. You should probably try updating and see if that helps:

sudo apt-get update
sudo apt-get upgrade

If you see any errors about packages held back, you might need a more thorough update command. But we’ll cross that bridge if we come to it!