Core Electronics Forum

Neopixels on raspberry Pi and need help

Hi guys so I’m trying to complete this project using neopixels on a raspberry Pi here Overview | NeoPixels on Raspberry Pi | Adafruit Learning System and so I’ve got some of my led to light up but only when I pull out the ground connected

and when it’s plugged in it does not light up also when I try to code it comes up with And I don’t get what this means as this is my first project does anyone know why this might be happening?
Thanks

2 Likes

Hey Lewis,

Neopixel is Adafruit’s name for WS2812 LEDs (we call ours GlowBits, though there are some slight differences. Disconnecting a ground wire definitely should not make your circuit work. Indeed it’s not if you aren’t running any code yet - you may just be damaging something and the side effect is a green glow.

I’d recommend checking out our quickstart guide here:

This guide skips the programming side of things so you can just troubleshoot your wiring separately, then once that’s working you can worry about coding your own effects. Which by the way, it looks like you’re trying to type Python code into your Linux terminal?

This won’t work, you need to enter that code into a REPL, or into a script. To start a Python REPL in the terminal (with root access, as required for these commands but be careful! Root access means you can edit things you probably shouldn’t) enter:
sudo python3

You will know you’ve got a REPL active by the command line starting with three right chevrons:
>>>

4 Likes

Hi Lewis, it would help to use same colored wires for all positive and another color for all negative polarities.
I see you are using a level shifter.
The brown wire from the 1Y of the shifter should go to DIN. The photo is not clear, but to me it appears that it is connected to the white, which is the negative of the LED strip and the positive (yellow) is connected to the DIN input.
I have a similar set up. The LED strip will not light up when connected. Should light up only when the program runs.
I keep all positive in red color and all negative in black. Keeps everything G (alluding to my name) proof.

Use the thread linked by Oliver. I tried Adafruit library and got similar errors. The tutorial here is very helpful, also has input from members on troubleshooting.

2 Likes

Hi Guys
Just poking my nose in here but I don’t see how you can tell anything from the pics that I can see. It appears to me that the white wire from the strip (negative or ground) goes nowhere. Nothing much is going to work like that.

Just for the record I have a couple of similar neo pixel strips. Loaded Core’s version of Adafruits demo into a 5V Arduino. Powered from a 5V supply with a bit of grunt (14A) and Presto. worked like a charm.
Modified and added to sketch, loaded into an Arduino Pro Mini 5V version (so it fits into my box), added another strip so the mini is now driving 2 strips and I now have my XMAS lights nearly finished. Arduino is powered from same 5V supply.

Just pointing this out to show there is nothing wrong with strips or Arduino/RPi when connected properly. If you are running strip from a separate power supply (you should be) disconnect it before programming and powering via the USB connection. Or if you need to have the LED strip connected during this time disconnect the positive power connection between the led strip and Arduino/RPi.
Cheers Bob

5 Likes