SK6812RGBW on Photon

I’ve been working on a project that uses RGBW Neopixels (SK6812RGBW) on the Photon. I’ve tested the code and the wiring with WS2812 Neopixels without issue, but I haven’t been able to get the SK6812RGBW working at all.
I have a single pixel connected, powered off VIN with a 1000µF capacitor across VIN and GND. I also have 440Ω between D2 and the pixel.

Here’s the testing code.

#include "neopixel.h"

SYSTEM_MODE(AUTOMATIC);

#define PIXEL_PIN D2
#define PIXEL_COUNT 1
#define PIXEL_TYPE SK6812RGBW
#define BRIGHTNESS 50

Adafruit_NeoPixel strip(PIXEL_COUNT, PIXEL_PIN, PIXEL_TYPE);

void setup() {
  strip.setBrightness(BRIGHTNESS);
  strip.begin();
  strip.show();
}

void loop() {
  for (int i = 0; i < strip.numPixels(); i++) {
  strip.setPixelColor(i, strip.Color(20, 20, 20, 20 ) );
  }
  strip.show();
  delay(2000);
  for (int i = 0; i < strip.numPixels(); i++) {
  strip.setPixelColor(i, strip.Color(255, 255, 255, 255 ) );
  }
  strip.show();
  delay(2000);
}

The 1000uF is probably not necessary but you do need 5volt to power the SK6812RGBW and therefore also a 3.3 to 5v level shifter (which can easily be done with a transistor and 2 resistors)

1 Like

Hi,

Well for testing using one pixel, you don't need a for loop counting off the pixels. Try:-

void loop(){
strip.setPixelColor(0,255,0,0,0);
strip.show();
delay(500);
strip.setPixelColor(0,0,0,0,0);
strip.show();
delay(500);
}

That should make it blink.

Are you using a naked pixel that you have simply soldered wire to the pixel, or are you using a pre bought board that has the capacitor and resistor inplace?

Liam