Monthly Archives: August 2017

RGBW NeoPixel ring works with the Particle Photon

I tried hard to make an RGB NeoPixel ring with the Particle Photon, but never manage to do it. So I ordered the new RGBW NeoPixel ring and now it works really fine. It even work without the logic converter in fact. Here my demo and the code.

// Set pixel COUNT, PIN and TYPE
#define PIXEL_COUNT 16
#define PIXEL_PIN D2
#define PIXEL_TYPE SK6812RGBW

// Adafruit NeoPixel library found in the Particle.io IDE.
#include <neopixel.h>

Adafruit_NeoPixel strip(PIXEL_COUNT, PIXEL_PIN, PIXEL_TYPE);

void setup() {
    strip.begin();
    strip.setBrightness(10); // Brightness 0-255
    strip.show(); // Initialize all pixels to 'Off'

}

void loop() {
    testAll();
}

void testAll() {
    for(uint16_t i=0; i<strip.numPixels(); i++) {
        strip.setPixelColor(i,0,0,0,255);
        strip.show();
        delay(250);
        strip.setPixelColor(i,0,0,0,0);
    }
}