[SOLVED!]Raspberry Pi Model B + Unicorn = error?

Hi all,

I’ve connected my Unicorn hat to my Raspberry Pi Model B with jumperwires, but when i run the test script i keep getting this error:

Gpio 18 is illegal for LED channel 0
Traceback (most recent call last):
  File "./simple.py", line 5, in <module>
import unicornhat as unicorn
  File "/usr/local/lib/python2.7/dist-packages/unicornhat.py", line 35, in <module>
  File "/usr/local/lib/python2.7/dist-packages/rpi_ws281x/rpi_ws281x.py", line 131, in begin
raise RuntimeError('ws2811_init failed with code {0} ({1})'.format(resp, str_resp))
RuntimeError: ws2811_init failed with code -11 (Selected GPIO not possible)


Can someone help me out please?

Thank you,

What version number does your Pi say it is if you run:

cat /proc/cpuinfo | grep Revision

Thanks for your message!

This is the output:

Revision : 000d

Did you run curl -sS https://get.pimoroni.com/unicornhat | bash to set it up?

Yes i did, everything is installed without any errors.

Thank you- think I’ve found and fixed the problem.

Try running:

sudo pip install --upgrade rpi_ws281x
sudo pip3 install --upgrade rpi_ws281x
1 Like

GREAT!! Thank you so much! It’s working now.

1 Like