Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using a different GPIO Pin? #13

Open
TheHodge opened this issue Jan 29, 2021 · 1 comment
Open

Using a different GPIO Pin? #13

TheHodge opened this issue Jan 29, 2021 · 1 comment

Comments

@TheHodge
Copy link

Hey folks, I'm using a Pi with a PIHat on so i'm limited to the ports I can use.. for the LED data I'm trying to use either 17 or 27 but when I run that I get, apologies if this is obvious python and GPIO fun is new to me and this is my starting project :)

error: XDG_RUNTIME_DIR not set in the environment. Gpio 17 is illegal for LED channel 0 Traceback (most recent call last): File "magicband.py", line 278, in <module> MagicBand().run() File "magicband.py", line 78, in __init__ self.playStartupSequence() File "magicband.py", line 102, in playStartupSequence self.do_lights_on(COLORS["white"]) File "magicband.py", line 234, in do_lights_on self.pixels.show() File "/usr/local/lib/python3.7/dist-packages/adafruit_pypixelbuf.py", line 195, in show return self._transmit(self._post_brightness_buffer) File "/usr/local/lib/python3.7/dist-packages/neopixel.py", line 167, in _transmit neopixel_write(self.pin, buffer) File "/usr/local/lib/python3.7/dist-packages/neopixel_write.py", line 25, in neopixel_write return _neopixel.neopixel_write(gpio, buf) File "/usr/local/lib/python3.7/dist-packages/adafruit_blinka/microcontroller/bcm283x/neopixel.py", line 80, in neopixel_write "ws2811_init failed with code {0} ({1})".format(resp, message) RuntimeError: ws2811_init failed with code -11 (Selected GPIO not possible) swig/python detected a memory leak of type 'ws2811_t *', no destructor found.

@joncherston
Copy link

First off, I'm not an expert, but I have spent significant time trying to resolve various issues I've run into with this project. My understanding is that you need a clock pin for lights as well as for audio. Unfortunately, on the Raspberry Pi, there is only one clock pin, which is why you have to connect the light strip data to that one pin. This is also why you have to use the HDMI out for audio, because that one pin can't be used for both the light strip and audio.
To resolve the XDG_RUNTIME_DIR error, you can look to that thread in the issues section here on GitHub.
When I run my device, I eventually get a buffer underrun error. I believe that I connected to the memory leak error that you get at the end of what you posted. I haven't yet resolved that issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants