Help with programmable ws2812 LED

I have hooked up a programmable ws2812 LED . The Datasheet says “Default power on does not light up”

Using the hook up guide and a breadboard I have a single LED where …

  • DIN is attached to GPIO 10 on the PiZero (tried with and without 220 resister)
  • VDD is attached 5V (Board Pin 2) - For single LED this should be fine
  • GND is attached (Board Pin 6)
  • DOUT is not attached

I am testing just with one LED for now. This is the Python Script saved as that is running using sudo python3

import board
import neopixel
pixels = neopixel.NeoPixel(board.D10, 1)
#pixels.fill((0, 255, 0))
pixels[0] = (255, 0, 0)

SPI has also been enabled on the Pi

I have confirmed with a multimeter there is 5V on the LED pins and for one LEd I believe the 5v out is good enough.

However it runs without code error however the LED does not light up in any way.

I have also posted my question here: python 3 - Programmable ws2812 LED fail to light up on Pi Zero - Raspberry Pi Stack Exchange

Is the D10 supposed to reference the physical pin number or the GPIO BCM number?
(board.D10, 1)

It is the GPIO, only because when I did not initially realise NeoPixels must be connected to D10, D12, D18 or D21 to work and it would give me an error saying GPIO with the number I provided was not valid. Also if you put a board number that higher than the number of GPIO pins it errors.

What is reference / tutorial your going by?

According to this Raspberry Pi Wiring | NeoPixels on Raspberry Pi | Adafruit Learning System

The only issue to deal with is converting the Pi’s GPIO from 3.3V up to about 5V for the NeoPixel to read. There are two ways you can do this level conversion, either with a simple 1N4001 power diode or with a level converter chip like the 74AHCT125.

Yes I had seen that, however with only one LED this guide suggests you can do it without Raspberry Pi Wiring | NeoPixels on Raspberry Pi | Adafruit Learning System

That’s not how I read it. One caution in regards to connecting directly to the Pi is current draw from the Pi’s +5V GPIO pin. One or two Neopixels will likely be fine. Anymore and you should be powering them from a separate +5V power supply. You just use a common ground.
The other caution is the logic level issue. The Pi uses 3.3v logic signals while the Neopixes are looking for 5V logic signals. From the link you posted

Remember, your NeoPixels may not work connected directly to the Raspberry Pi without a level shifter. If you run into issues, try adding a level shifter to your project.

Yes I think this explained it well. Shifting Levels | Level Shifting 3.3V microcontrollers and NeoPixels | Adafruit Learning System

You can use the 5v from the board however the PI still runs at 3.3V logic levels

"Some microcontrollers, such as the Arduino Uno and Adafruit Metro 32u4, run at 5V logic levels, and so their data pins can speak directly with the NeoPixel. Other microcontrollers, such as the Adafruit Feather boards, Arduino M0 Pro, Teensy 3, and others, run at 3.3V logic levels. This means there can be a communications mismatch when one of their data pins tries to talk to the NeoPixel’s DIN input.

When the 3.3V board tries to talk to the 5V NeoPixel, a variety of strange behaviors can be exibited, including incorrect colors, flickering, dimness, and seemingly “dead” pixels.

And its not just Neopixels. There are other bits of kit out there that want 5v logic signals
Plus you have to be very careful not to connect something that “sends” a 5V logic signal to a Pi, it will damage it.
Devices made for a Pi will have the conversion done for you. Things like Blinkt, and Unicorn Hats etc.

I’ve been using Neopixels with 3v3 boards such as Raspberry Pi and CircuitPython Adafruit boards. Their use with the new 3v3 Pico is explained in the Guide and the Python SDK, so it is safe.

Power must be 5v. The data is normal 3v3 from a signal pin. I’ve had my Pico happily driving a 16 Neopixel ring. The 5v came from the 5v out pin on the Pico.