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


#1

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>
ws2812.begin()
  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)

gpio

Can someone help me out please?

Thank you,
Michael


#2

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

cat /proc/cpuinfo | grep Revision

#3

Thanks for your message!

This is the output:

Revision : 000d


#4

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


#5

Yes i did, everything is installed without any errors.


#6

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

Try running:

sudo pip install --upgrade rpi_ws281x
sudo pip3 install --upgrade rpi_ws281x

#7

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