NeoPixel + Blynk (ZeRGBa)= Custom RGB Lighting for your PC?

I had this Idea a while ago. I need help on how to implement it. It would be pretty basic, but I want it to be more “Awesome”.

Also, I would like to know if someone actually did it irl :slight_smile:

I making similar project right now, pm me here.

Okay, Tell me When you finish it. I might not have the time to make it.

Click here to see my own Blynk LED project using common ws2811/ws2812/ws2812b leds.
Code is in there too… but just for you, ill post the latest version here along with the dash QR code.
It will be about 3500 energy to clone it.

/*
  Virtual Ports:
  V0 = Hue (Slider 0-255)
  V1 = Saturation (Slider 0-255)
  V2 = Brightness (Slider 0-255)
  V3 = Cycle Pre-set (Momentary Button)
  V4 = Colour: Blue (Momentary Button)
  V5 = Updates Per Sec (Slider 1-500)
  V6 = Colour: Red (Momentary Button)
  V7 = Colour: Green (Momentary Button)
  V8 = Colour: White (Momentary Button)
  V9 = Terminal Widget
  V10 = Manual Mode (Switch Button)
  V11 = Sync gHUE (Momentary Button)
  V12 = Colour: Yellow (Momentary Button)
  V13 = Alert Mode (Momentary Button)
  V14 = OFF (Momentary Button)
  V15 = Colour: Light Blue (Momentary Button)
  V16 = Shelf Up Time (Value Widget)
  V17 = Shelf Wifi Signal (Value Widget)
*/
/****************************************************************************/
//#define BLYNK_PRINT Serial
#include <ArduinoOTA.h>
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <FastLED.h>
#include <SimpleTimer.h>
#include <elapsedMillis.h>
/****************************************************************************/
#define BLYNK_MSG_LIMIT    200
#define DATA_PIN           12
/************* CHANGE SETTINGS HERE ONLY AND OTA IN SETUP ****************/
#define NUM_LEDS 10
char nickname[] = "LOUNGE1";
/*** DONT USE 1. ITS RESERVED FOR "ALL" ***/
//int HardwareZone = 2; // Office
int HardwareZone = 3; // Lounge
char auth[] = "xxxxxxxxxxxxxxxxxxxxxxxxxxx";
/************************ END CHANGE SETTINGS *******************************/
int varHue;
int varHuePrev;
int varHueNew;
int varSaturation;
int varBrightness;
int varManualMode;
int varNextColour;
int varNextColourPrev;
int varBlendingMode;
int varUpdatesPerSec;
int varAlertMode;
int varZone;
/****************************************************************************/
WidgetTerminal terminal(V9);
SimpleTimer timer;
CRGB leds[NUM_LEDS];
/****************************************************************************/
void sendUptime() {
  Blynk.virtualWrite(V18, millis() / 1000);
  Blynk.virtualWrite(V19, map(WiFi.RSSI(), -105, -40, 0, 100) );
}
/****************************************************************************/
void setup()
{
  WiFi.mode(WIFI_STA);
  Blynk.begin(auth, "xxxxxxxxx", "xxxxxxxxx");
  //Blynk.begin(auth, "xxxxxxxxx", "xxxxxxxxx", IPAddress(192, 168, 1, 2));
  while (Blynk.connect() == false) {}
  /*********** OTA *************/
  ArduinoOTA.setHostname("ESP-LED-01");
  ArduinoOTA.begin();
  /******** BOOT VARS **********/
  varHue = 190;           // Start on a Blue Hue
  varSaturation = 255;    // Start Full Colour
  varBrightness = 255;    // Start Full Brightness
  varManualMode = 0;      // Start in preset mode
  varNextColour = 0;      //
  varNextColourPrev = 0;  // Set Button State
  varBlendingMode = 1;    // Start LINEARBLEND
  varUpdatesPerSec = 100; // Start on 100 fps
  varAlertMode = 0;       // Start Alert Mode OFF
  varZone = 1;
  /******** FASTLED ************/
  FastLED.addLeds<WS2811, DATA_PIN, GRB>(leds, NUM_LEDS);
  /******** READY **************/
  terminal.print(F("# Blynk v" BLYNK_VERSION ": "));
  terminal.print(nickname);
  terminal.println(F(" Device started"));
  terminal.flush();
  timer.setInterval(1000L, sendUptime);
}
/****************************************************************************/
// List of patterns to cycle through.  Each is defined as a separate function below.
typedef void (*SimplePatternList[])();
SimplePatternList gPatterns = { rainbow, rainbowWithGlitter, confetti, sinelon, juggle, whitescan };
uint8_t gCurrentPatternNumber = 0; // Index number of which pattern is current
uint8_t gHue = 0; // rotating "base color" used by many of the patterns
/****************************************************************************/
BLYNK_WRITE(V0) {
  if ( (varZone == HardwareZone) || (varZone == 1)) {
    varHue = param.asInt();
    //terminal.print(nickname);
    //terminal.print(" | Hue: ");
    //terminal.println(varHue);
    //terminal.flush();
    //HexRGB = ((long)leds[0].r << 16) | ((long)leds[0].g << 8 ) | (long)leds[0].b;
    //Blynk.setProperty(V0, "color", "#" + String(HexRGB, HEX));
  }
}
BLYNK_WRITE(V1) {
  if ( (varZone == HardwareZone) || (varZone == 1)) {
    varSaturation = param.asInt();
    //terminal.print(nickname);
    //terminal.print(" | Saturation: ");
    //terminal.println(varSaturation);
    //terminal.flush();
  }
}
BLYNK_WRITE(V2) {
  if ( (varZone == HardwareZone) || (varZone == 1)) {
    varBrightness = param.asInt();
    //terminal.print(nickname);
    //terminal.print(" | Brightness: ");
    //terminal.println(varBrightness);
    //terminal.flush();
  }
}
BLYNK_WRITE(V3) {
  if ( (varZone == HardwareZone) || (varZone == 1)) {
    varNextColour = param.asInt();
    if (varNextColour == 1 && varNextColourPrev == 0) {
      nextPattern();
      //terminal.print(nickname);
      //terminal.println("  | Next Colour Pattern");
      //terminal.flush();
      delay(10);
    }
    varNextColourPrev = varNextColour;
  }
}
BLYNK_WRITE(V4) {
  if ( (varZone == HardwareZone) || (varZone == 1)) {
    varManualMode = 1;
    Blynk.virtualWrite(V10, varManualMode);
    varBrightness = (int)255;
    Blynk.virtualWrite(V2, 255);
    varSaturation = (int)255;
    Blynk.virtualWrite(V1, 255);
    varHue        = (int)152;
    Blynk.virtualWrite(V0, 152);
    //terminal.print(nickname);
    //terminal.println(" | Blue");
    //terminal.flush();
    delay(10);
  }
}
BLYNK_WRITE(V5) {
  if ( (varZone == HardwareZone) || (varZone == 1)) {
    varUpdatesPerSec = param.asInt();
    //terminal.print(nickname);
    //terminal.print(" | Updates Per Sec: ");
    //terminal.println(varUpdatesPerSec);
    //terminal.flush();
  }
}
BLYNK_WRITE(V6) {
  if ( (varZone == HardwareZone) || (varZone == 1)) {
    varManualMode = 1;
    Blynk.virtualWrite(V10, varManualMode);
    varBrightness = (int)255;
    Blynk.virtualWrite(V2, 255);
    varSaturation = (int)255;
    Blynk.virtualWrite(V1, 255);
    varHue        = (int)0;
    Blynk.virtualWrite(V0, 0);
    //terminal.print(nickname);
    //terminal.println(" | Red");
    //terminal.flush();
    delay(10);
  }
}
BLYNK_WRITE(V7) {
  if ( (varZone == HardwareZone) || (varZone == 1)) {
    varManualMode = 1;
    Blynk.virtualWrite(V10, varManualMode);
    varBrightness = (int)255;
    Blynk.virtualWrite(V2, 255);
    varSaturation = (int)255;
    Blynk.virtualWrite(V1, 255);
    varHue        = (int)80;
    Blynk.virtualWrite(V0, 80);
    //terminal.print(nickname);
    //terminal.println(" | Green");
    //terminal.flush();
    delay(10);
  }
}
BLYNK_WRITE(V8) {
  if ( (varZone == HardwareZone) || (varZone == 1)) {
    varManualMode = 1;
    Blynk.virtualWrite(V10, varManualMode);
    varBrightness = (int)255;
    Blynk.virtualWrite(V2, 255);
    varSaturation = (int)0;
    Blynk.virtualWrite(V1, 0);
    //terminal.print(nickname);
    //terminal.println(" | White");
    //terminal.flush();
    delay(10);
  }
}
BLYNK_WRITE(V10) {
  if ( (varZone == HardwareZone) || (varZone == 1)) {
    varManualMode = param.asInt();
    //terminal.print(nickname);
    //terminal.print(" | Manual Mode: ");
    if (varManualMode == 0) {
      //terminal.println("OFF");
    }
    if (varManualMode == 1) {
      //terminal.println("ON");
    }
    //terminal.flush();
  }
}

BLYNK_WRITE(V11) {
  gHue = 0;
  terminal.print(nickname);
  terminal.println(" | Sync'd gHUE ");
  terminal.flush();
}

BLYNK_WRITE(V15) {
  if ( (varZone == HardwareZone) || (varZone == 1)) {
    varManualMode = 1;
    Blynk.virtualWrite(V10, varManualMode);
    varBrightness = (int)255;
    Blynk.virtualWrite(V2, 255);
    varSaturation = (int)255;
    Blynk.virtualWrite(V1, 255);
    varHue        = (int)27;
    Blynk.virtualWrite(V0, 27);
    //terminal.print(nickname);
    //terminal.println(" | Orange");
    //terminal.flush();
    delay(10);
  }
}

BLYNK_WRITE(V12) {
  if ( (varZone == HardwareZone) || (varZone == 1)) {
    varManualMode = 1;
    Blynk.virtualWrite(V10, varManualMode);
    varBrightness = (int)255;
    Blynk.virtualWrite(V2, 255);
    varSaturation = (int)255;
    Blynk.virtualWrite(V1, 255);
    varHue        = (int)64;
    Blynk.virtualWrite(V0, 64);
    //terminal.print(nickname);
    //terminal.println(" | Yellow");
    //terminal.flush();
    delay(10);
  }
}

BLYNK_WRITE(V13) {
  varAlertMode = param.asInt();
  terminal.print(nickname);
  terminal.println(" | ALERT!");
  terminal.flush();
}

BLYNK_WRITE(V14) {
  if ( (varZone == HardwareZone) || (varZone == 1)) {
    varManualMode = 1;
    Blynk.virtualWrite(V10, varManualMode);
    varBrightness = (int)0;
    Blynk.virtualWrite(V2, 0);
    //terminal.print(nickname);
    //terminal.println(" | OFF");
    //terminal.flush();
    delay(10);
  }
}

BLYNK_WRITE(V23) {
  varZone = param.asInt();
  if (varZone == HardwareZone) {
    terminal.print(nickname);
    terminal.println(" | Zone Selected!");
    terminal.flush();
    Blynk.virtualWrite(V0,  varHue);
    Blynk.virtualWrite(V1,  varSaturation);
    Blynk.virtualWrite(V2,  varBrightness);
    Blynk.virtualWrite(V5,  varUpdatesPerSec);
    Blynk.virtualWrite(V10, varManualMode);
  }
}
/****************************************************************************/
void loop()
{
  Blynk.run();
  ArduinoOTA.handle();
  timer.run(); // Initiates SimpleTimer

  if (varAlertMode == 1) {
    for (int i = 0; i < 20; i++) {
      fill_solid(leds, NUM_LEDS, CRGB::White);
      FastLED.show();
      FastLED.delay(50);
      fill_solid(leds, NUM_LEDS, CRGB::Black);
      FastLED.show();
      FastLED.delay(50);
    }
    varAlertMode = 0;
  }

  if (varManualMode == 1) { // Manual Control
    fill_solid(leds, NUM_LEDS, CHSV(varHue, varSaturation, varBrightness));
  }

  if (varManualMode == 0) { // Pallette Mode

    // Call the current pattern function once, updating the 'leds' array
    gPatterns[gCurrentPatternNumber]();

    FastLED.show();
    FastLED.delay(1000 / varUpdatesPerSec);

    EVERY_N_MILLISECONDS( 20 ) {
      gHue++;  // slowly cycle the "base color" through the rainbow
    }
  }
  FastLED.show();
}
/****************************************************************************/
#define ARRAY_SIZE(A) (sizeof(A) / sizeof((A)[0]))

void nextPattern() {
  // add one to the current pattern number, and wrap around at the end
  gCurrentPatternNumber = (gCurrentPatternNumber + 1) % ARRAY_SIZE( gPatterns);
}

void rainbow() {
  // FastLED's built-in rainbow generator
  fill_rainbow( leds, NUM_LEDS, gHue, 7);
}

void rainbowWithGlitter() {
  // built-in FastLED rainbow, plus some random sparkly glitter
  rainbow();
  addGlitter(80);
}

void addGlitter( fract8 chanceOfGlitter) {
  if ( random8() < chanceOfGlitter) {
    leds[ random16(NUM_LEDS) ] += CRGB::White;
  }
}

void confetti() {
  // random colored speckles that blink in and fade smoothly
  fadeToBlackBy( leds, NUM_LEDS, 10);
  int pos = random16(NUM_LEDS);
  leds[pos] += CHSV( gHue + random8(64), 200, 255);
}

void sinelon() {
  // a colored dot sweeping back and forth, with fading trails
  fadeToBlackBy( leds, NUM_LEDS, 20);
  int pos = beatsin16(13, 0, NUM_LEDS);
  leds[pos] += CHSV( gHue, 255, 192);
}

void juggle() {
  // eight colored dots, weaving in and out of sync with each other
  fadeToBlackBy( leds, NUM_LEDS, 20);
  byte dothue = 0;
  for ( int i = 0; i < 8; i++) {
    leds[beatsin16(i + 7, 0, NUM_LEDS)] |= CHSV(dothue, 200, 255);
    dothue += 32;
  }
}

void whitescan() {
  for (int i = 0; i < NUM_LEDS; i++) {
    leds[i] = CRGB::White;
    FastLED.show();
    FastLED.delay(1000 / varUpdatesPerSec);
    leds[i] = CRGB::Black;

  }
}

Well… I don’t have 3500 energy, but if I edit that code, I can make it work with only one ZeRGBa, Right?

I’ll upload it to instructable and arduino project hub when I make it, Hope I get 2000 energy or so.

Not easily no. Just use a slider to pick the colour. Far easier (and cheaper).

Huh? I thought using the ZeRGBa would be more cheaper since it uses only 600 energy, and its far more advanced i think.
AFAIK the ZeRGBa’s a HSV selector to RGB widget.

I haven’t used an ESP8266 with Blynk, Maybe I’ll try if I get a WeMos or ESP-12 or so.

I copied your project.
But after each action writes “Your NodeMCU was disconnected”.
What am I doing wrong?

Have you had success getting your hardware connected via an example first?
Also check you’re not flossing the cloud server as I use a local server with no flood limits

Yes, I used the library Adafruit_NeoPixel.h.
With this library LEDs work.
But with FastLED.h LEDs do not light up.
I’m using WS2812 16led
I use the cloud server.

If you’re not using my code and the fastled library then I can’t really help as you’ll need to rewrite your own code with the changes.

Also when using the cloud server make sure you have send on release turned off for the slider widgets else you will cause a flood error and be disconnected.

I use this code:

/*
  Virtual Ports:
  V0 = Hue (Slider 0-255)
  V1 = Saturation (Slider 0-255)
  V2 = Brightness (Slider 0-255)
  V3 = Cycle Pre-set (Momentary Button)
  V4 = Colour: Blue (Momentary Button)
  V5 = Updates Per Sec (Slider 1-500)
  V6 = Colour: Red (Momentary Button)
  V7 = Colour: Green (Momentary Button)
  V8 = Colour: White (Momentary Button)
  V9 = Terminal Widget
  V10 = Manual Mode (Switch Button)
  V11 = Sync gHUE (Momentary Button)
  V12 = Colour: Yellow (Momentary Button)
  V13 = Alert Mode (Momentary Button)
  V14 = OFF (Momentary Button)
  V15 = Colour: Light Blue (Momentary Button)
  V16 = Shelf Up Time (Value Widget)
  V17 = Shelf Wifi Signal (Value Widget)
*/
/****************************************************************************/
//#define BLYNK_PRINT Serial
#include &lt;ArduinoOTA.h&gt;
#include &lt;ESP8266WiFi.h&gt;
#include &lt;BlynkSimpleEsp8266.h&gt;
#include &lt;FastLED.h&gt;
#include &lt;SimpleTimer.h&gt;
#include &lt;elapsedMillis.h&gt;
/****************************************************************************/
#define BLYNK_MSG_LIMIT    200
#define DATA_PIN           12
/************* CHANGE SETTINGS HERE ONLY AND OTA IN SETUP ****************/
#define NUM_LEDS 10
char nickname[] = "LOUNGE1";
/*** DONT USE 1. ITS RESERVED FOR "ALL" ***/
//int HardwareZone = 2; // Office
int HardwareZone = 3; // Lounge
char auth[] = "xxxxxxxxxxxxxxxxxxxxxxxxxxx";
/************************ END CHANGE SETTINGS *******************************/
int varHue;
int varHuePrev;
int varHueNew;
int varSaturation;
int varBrightness;
int varManualMode;
int varNextColour;
int varNextColourPrev;
int varBlendingMode;
int varUpdatesPerSec;
int varAlertMode;
int varZone;
/****************************************************************************/
WidgetTerminal terminal(V9);
SimpleTimer timer;
CRGB leds[NUM_LEDS];
/****************************************************************************/
void sendUptime() {
  Blynk.virtualWrite(V18, millis() / 1000);
  Blynk.virtualWrite(V19, map(WiFi.RSSI(), -105, -40, 0, 100) );
}
/****************************************************************************/
void setup()
{
  WiFi.mode(WIFI_STA);
  Blynk.begin(auth, "xxxxxxxxx", "xxxxxxxxx");
  //Blynk.begin(auth, "xxxxxxxxx", "xxxxxxxxx", IPAddress(192, 168, 1, 2));
  while (Blynk.connect() == false) {}
  /*********** OTA *************/
  ArduinoOTA.setHostname("ESP-LED-01");
  ArduinoOTA.begin();
  /******** BOOT VARS **********/
  varHue = 190;           // Start on a Blue Hue
  varSaturation = 255;    // Start Full Colour
  varBrightness = 255;    // Start Full Brightness
  varManualMode = 0;      // Start in preset mode
  varNextColour = 0;      //
  varNextColourPrev = 0;  // Set Button State
  varBlendingMode = 1;    // Start LINEARBLEND
  varUpdatesPerSec = 100; // Start on 100 fps
  varAlertMode = 0;       // Start Alert Mode OFF
  varZone = 1;
  /******** FASTLED ************/
  FastLED.addLeds&lt;WS2811, DATA_PIN, GRB&gt;(leds, NUM_LEDS);
  /******** READY **************/
  terminal.print(F("# Blynk v" BLYNK_VERSION ": "));
  terminal.print(nickname);
  terminal.println(F(" Device started"));
  terminal.flush();
  timer.setInterval(1000L, sendUptime);
}
/****************************************************************************/
// List of patterns to cycle through.  Each is defined as a separate function below.
typedef void (*SimplePatternList[])();
SimplePatternList gPatterns = { rainbow, rainbowWithGlitter, confetti, sinelon, juggle, whitescan };
uint8_t gCurrentPatternNumber = 0; // Index number of which pattern is current
uint8_t gHue = 0; // rotating "base color" used by many of the patterns
/****************************************************************************/
BLYNK_WRITE(V0) {
  if ( (varZone == HardwareZone) || (varZone == 1)) {
    varHue = param.asInt();
    //terminal.print(nickname);
    //terminal.print(" | Hue: ");
    //terminal.println(varHue);
    //terminal.flush();
    //HexRGB = ((long)leds[0].r &lt;&lt; 16) | ((long)leds[0].g &lt;&lt; 8 ) | (long)leds[0].b;
    //Blynk.setProperty(V0, "color", "#" + String(HexRGB, HEX));
  }
}
BLYNK_WRITE(V1) {
  if ( (varZone == HardwareZone) || (varZone == 1)) {
    varSaturation = param.asInt();
    //terminal.print(nickname);
    //terminal.print(" | Saturation: ");
    //terminal.println(varSaturation);
    //terminal.flush();
  }
}
BLYNK_WRITE(V2) {
  if ( (varZone == HardwareZone) || (varZone == 1)) {
    varBrightness = param.asInt();
    //terminal.print(nickname);
    //terminal.print(" | Brightness: ");
    //terminal.println(varBrightness);
    //terminal.flush();
  }
}
BLYNK_WRITE(V3) {
  if ( (varZone == HardwareZone) || (varZone == 1)) {
    varNextColour = param.asInt();
    if (varNextColour == 1 && varNextColourPrev == 0) {
      nextPattern();
      //terminal.print(nickname);
      //terminal.println("  | Next Colour Pattern");
      //terminal.flush();
      delay(10);
    }
    varNextColourPrev = varNextColour;
  }
}
BLYNK_WRITE(V4) {
  if ( (varZone == HardwareZone) || (varZone == 1)) {
    varManualMode = 1;
    Blynk.virtualWrite(V10, varManualMode);
    varBrightness = (int)255;
    Blynk.virtualWrite(V2, 255);
    varSaturation = (int)255;
    Blynk.virtualWrite(V1, 255);
    varHue        = (int)152;
    Blynk.virtualWrite(V0, 152);
    //terminal.print(nickname);
    //terminal.println(" | Blue");
    //terminal.flush();
    delay(10);
  }
}
BLYNK_WRITE(V5) {
  if ( (varZone == HardwareZone) || (varZone == 1)) {
    varUpdatesPerSec = param.asInt();
    //terminal.print(nickname);
    //terminal.print(" | Updates Per Sec: ");
    //terminal.println(varUpdatesPerSec);
    //terminal.flush();
  }
}
BLYNK_WRITE(V6) {
  if ( (varZone == HardwareZone) || (varZone == 1)) {
    varManualMode = 1;
    Blynk.virtualWrite(V10, varManualMode);
    varBrightness = (int)255;
    Blynk.virtualWrite(V2, 255);
    varSaturation = (int)255;
    Blynk.virtualWrite(V1, 255);
    varHue        = (int)0;
    Blynk.virtualWrite(V0, 0);
    //terminal.print(nickname);
    //terminal.println(" | Red");
    //terminal.flush();
    delay(10);
  }
}
BLYNK_WRITE(V7) {
  if ( (varZone == HardwareZone) || (varZone == 1)) {
    varManualMode = 1;
    Blynk.virtualWrite(V10, varManualMode);
    varBrightness = (int)255;
    Blynk.virtualWrite(V2, 255);
    varSaturation = (int)255;
    Blynk.virtualWrite(V1, 255);
    varHue        = (int)80;
    Blynk.virtualWrite(V0, 80);
    //terminal.print(nickname);
    //terminal.println(" | Green");
    //terminal.flush();
    delay(10);
  }
}
BLYNK_WRITE(V8) {
  if ( (varZone == HardwareZone) || (varZone == 1)) {
    varManualMode = 1;
    Blynk.virtualWrite(V10, varManualMode);
    varBrightness = (int)255;
    Blynk.virtualWrite(V2, 255);
    varSaturation = (int)0;
    Blynk.virtualWrite(V1, 0);
    //terminal.print(nickname);
    //terminal.println(" | White");
    //terminal.flush();
    delay(10);
  }
}
BLYNK_WRITE(V10) {
  if ( (varZone == HardwareZone) || (varZone == 1)) {
    varManualMode = param.asInt();
    //terminal.print(nickname);
    //terminal.print(" | Manual Mode: ");
    if (varManualMode == 0) {
      //terminal.println("OFF");
    }
    if (varManualMode == 1) {
      //terminal.println("ON");
    }
    //terminal.flush();
  }
}

BLYNK_WRITE(V11) {
  gHue = 0;
  terminal.print(nickname);
  terminal.println(" | Sync'd gHUE ");
  terminal.flush();
}

BLYNK_WRITE(V15) {
  if ( (varZone == HardwareZone) || (varZone == 1)) {
    varManualMode = 1;
    Blynk.virtualWrite(V10, varManualMode);
    varBrightness = (int)255;
    Blynk.virtualWrite(V2, 255);
    varSaturation = (int)255;
    Blynk.virtualWrite(V1, 255);
    varHue        = (int)27;
    Blynk.virtualWrite(V0, 27);
    //terminal.print(nickname);
    //terminal.println(" | Orange");
    //terminal.flush();
    delay(10);
  }
}

BLYNK_WRITE(V12) {
  if ( (varZone == HardwareZone) || (varZone == 1)) {
    varManualMode = 1;
    Blynk.virtualWrite(V10, varManualMode);
    varBrightness = (int)255;
    Blynk.virtualWrite(V2, 255);
    varSaturation = (int)255;
    Blynk.virtualWrite(V1, 255);
    varHue        = (int)64;
    Blynk.virtualWrite(V0, 64);
    //terminal.print(nickname);
    //terminal.println(" | Yellow");
    //terminal.flush();
    delay(10);
  }
}

BLYNK_WRITE(V13) {
  varAlertMode = param.asInt();
  terminal.print(nickname);
  terminal.println(" | ALERT!");
  terminal.flush();
}

BLYNK_WRITE(V14) {
  if ( (varZone == HardwareZone) || (varZone == 1)) {
    varManualMode = 1;
    Blynk.virtualWrite(V10, varManualMode);
    varBrightness = (int)0;
    Blynk.virtualWrite(V2, 0);
    //terminal.print(nickname);
    //terminal.println(" | OFF");
    //terminal.flush();
    delay(10);
  }
}

BLYNK_WRITE(V23) {
  varZone = param.asInt();
  if (varZone == HardwareZone) {
    terminal.print(nickname);
    terminal.println(" | Zone Selected!");
    terminal.flush();
    Blynk.virtualWrite(V0,  varHue);
    Blynk.virtualWrite(V1,  varSaturation);
    Blynk.virtualWrite(V2,  varBrightness);
    Blynk.virtualWrite(V5,  varUpdatesPerSec);
    Blynk.virtualWrite(V10, varManualMode);
  }
}
/****************************************************************************/
void loop()
{
  Blynk.run();
  ArduinoOTA.handle();
  timer.run(); // Initiates SimpleTimer

  if (varAlertMode == 1) {
    for (int i = 0; i &lt; 20; i++) {
      fill_solid(leds, NUM_LEDS, CRGB::White);
      FastLED.show();
      FastLED.delay(50);
      fill_solid(leds, NUM_LEDS, CRGB::Black);
      FastLED.show();
      FastLED.delay(50);
    }
    varAlertMode = 0;
  }

  if (varManualMode == 1) { // Manual Control
    fill_solid(leds, NUM_LEDS, CHSV(varHue, varSaturation, varBrightness));
  }

  if (varManualMode == 0) { // Pallette Mode

    // Call the current pattern function once, updating the 'leds' array
    gPatterns[gCurrentPatternNumber]();

    FastLED.show();
    FastLED.delay(1000 / varUpdatesPerSec);

    EVERY_N_MILLISECONDS( 20 ) {
      gHue++;  // slowly cycle the "base color" through the rainbow
    }
  }
  FastLED.show();
}
/****************************************************************************/
#define ARRAY_SIZE(A) (sizeof(A) / sizeof((A)[0]))

void nextPattern() {
  // add one to the current pattern number, and wrap around at the end
  gCurrentPatternNumber = (gCurrentPatternNumber + 1) % ARRAY_SIZE( gPatterns);
}

void rainbow() {
  // FastLED's built-in rainbow generator
  fill_rainbow( leds, NUM_LEDS, gHue, 7);
}

void rainbowWithGlitter() {
  // built-in FastLED rainbow, plus some random sparkly glitter
  rainbow();
  addGlitter(80);
}

void addGlitter( fract8 chanceOfGlitter) {
  if ( random8() &lt; chanceOfGlitter) {
    leds[ random16(NUM_LEDS) ] += CRGB::White;
  }
}

void confetti() {
  // random colored speckles that blink in and fade smoothly
  fadeToBlackBy( leds, NUM_LEDS, 10);
  int pos = random16(NUM_LEDS);
  leds[pos] += CHSV( gHue + random8(64), 200, 255);
}

void sinelon() {
  // a colored dot sweeping back and forth, with fading trails
  fadeToBlackBy( leds, NUM_LEDS, 20);
  int pos = beatsin16(13, 0, NUM_LEDS);
  leds[pos] += CHSV( gHue, 255, 192);
}

void juggle() {
  // eight colored dots, weaving in and out of sync with each other
  fadeToBlackBy( leds, NUM_LEDS, 20);
  byte dothue = 0;
  for ( int i = 0; i &lt; 8; i++) {
    leds[beatsin16(i + 7, 0, NUM_LEDS)] |= CHSV(dothue, 200, 255);
    dothue += 32;
  }
}

void whitescan() {
  for (int i = 0; i &lt; NUM_LEDS; i++) {
    leds[i] = CRGB::White;
    FastLED.show();
    FastLED.delay(1000 / varUpdatesPerSec);
    leds[i] = CRGB::Black;

  }
}

If
#define DATA_PIN 12
What do I get…


If
#define DATA_PIN 2
That project is compiled, but the LEDs are off

on?

Go and copy the code again because you loads of strange characters in there which is causing your error.

And yup costas good spitting. Turn of off :slight_smile:

I connected ws2812 to pin D6(GPIO12) and have #define DATA PIN 12


Therefore, it does not work.
Changed #define DATA PIN 6 and it worked.
Thank you!
Have a nice day

That’s so weird! Might be hardware dependant on how you define pins.
Esp8266/nodemcu define digital pins as gpios

i use your code but get some error


In file included from F:\Aduino\project\NeoPixelEsp8266\NeoPixelEsp8266.ino:27:0:

F:\Aduino\project\libraries\FastLED/FastLED.h:17:21: note: #pragma message: FastLED version 3.001.008

 #    pragma message "FastLED version 3.001.008"

                     ^

In file included from F:\Aduino\project\libraries\FastLED/FastLED.h:68:0,

                 from F:\Aduino\project\NeoPixelEsp8266\NeoPixelEsp8266.ino:27:

F:\Aduino\project\libraries\FastLED/fastspi.h:110:23: note: #pragma message: No hardware SPI pins defined.  All SPI access will default to bitbanged output

 #      pragma message "No hardware SPI pins defined.  All SPI access will default to bitbanged output"

                       ^

In file included from F:\Aduino\project\libraries\FastLED/FastLED.h:51:0,

                 from F:\Aduino\project\NeoPixelEsp8266\NeoPixelEsp8266.ino:27:

F:\Aduino\project\libraries\FastLED/fastpin.h: In instantiation of 'class FastPin<12u>':

F:\Aduino\project\libraries\FastLED/platforms/esp/8266/clockless_esp8266.h:21:49:   required from 'class ClocklessController<12, 26, 26, 52, (EOrder)66u, 0, false, 5>'

F:\Aduino\project\libraries\FastLED/chipsets.h:460:7:   required from 'class WS2811Controller800Khz<12u, (EOrder)66u>'

F:\Aduino\project\libraries\FastLED/FastLED.h:111:52:   required from 'class WS2811<12u, (EOrder)66u>'

F:\Aduino\project\libraries\FastLED/FastLED.h:298:39:   required from 'static CLEDController& CFastLED::addLeds(CRGB*, int, int) [with CHIPSET = WS2811; unsigned char DATA_PIN = 12u; EOrder RGB_ORDER = (EOrder)66u]'

F:\Aduino\project\NeoPixelEsp8266\NeoPixelEsp8266.ino:98:56:   required from here

F:\Aduino\project\libraries\FastLED/fastpin.h:207:2: error: static assertion failed: Invalid pin specified

  static_assert(validpin(), "Invalid pin specified");

  ^

need help thank you~!

A post was split to a new topic: Need help with Neopixel problem