CalebKussmaul / Stranger-Things-Integrated

Stranger things wall in one single python project
18 stars 5 forks source link

Adafruit_NeoPixel not defined #1

Open DomThePro02 opened 3 years ago

DomThePro02 commented 3 years ago

When i run app.py it is giving me this error:

Traceback (most recent call last): File "app.py", line 2, in import stranger File "/home/pi/Stranger-Things-Integrated/stranger.py", line 23, in strip = Adafruit_NeoPixel(LED_COUNT, GPIO_PIN, LED_FREQ_HZ, LED_DMA, LED_INVERT, LED_BRIGHTNESS) NameError: name 'Adafruit_NeoPixel' is not defined

I'm teaching myself how to use python through RasPi in a 3b+ and ive been solving problems but i cant get past this

CalebKussmaul commented 3 years ago

Hey @DomThePro02, it seems that I included instructions in requirements.txt that should have been in the Readme:

First install rpi_ws281x from https://github.com/jgarff/rpi_ws281x

That should fix the issue.

DomThePro02 commented 3 years ago

I had already installed the rpi_ws281x, with the included python wrapper, and I fixed and enabled spi and i2c beforehand. I have all of the adafruit libraries with circuitpython installed as well.

DomThePro02 commented 3 years ago

@CalebKussmaul I originally figured that I didn't have the correct libraries, and im new to Python and Raspberry Pi, seems like an odd issue. Im running python 3 though.

CalebKussmaul commented 3 years ago

@DomThePro02 ah that would do it. This project uses Python 2 and isn't compatible with Python 3.

DomThePro02 commented 3 years ago

I'll switch over the defaults and see what happens!