Random WS2812b's light up when LEDs refreshed

Hardware: NodeMCU ESP8266 (12E), 256 - WS2812b LEDs, 74LVC245 Logic Leveler.
Software: IDE 1.8.15, Blynk Library 1.0.1, blynk.cloud
Widgets: RTC

My project is a word clock. It gets the time, parses it and lights up the led’s that are behind the letters that spell out the time. I used this exact same hardware and code (getting the time from a time server) and everything worked. I wanted features of Blynk (the ability to change colors, etc) when I wrapped my code with blynk, the issue of extra lit LED’s arose…

The problem is when the code runs, it connects to the blynk server updates the RTC, but when the time is parsed and the LED’s turned on there are various other LEDs that illuminate also. I have checked all electrical connections.

#define BLYNK_TEMPLATE_ID "TMPLLvNnYzwL"
#define BLYNK_DEVICE_NAME "LED Blink"

#define BLYNK_FIRMWARE_VERSION        "1.0.1"
#define BLYNK_PRINT Serial
//#define BLYNK_DEBUG

#define APP_DEBUG


//**********************************************************************************************
//****************************************  Libraries  *****************************************
//**********************************************************************************************
#include "BlynkEdgent.h"
#include <TimeLib.h>
#include <WidgetRTC.h>
#include <Adafruit_NeoPixel.h>



//**********************************************************************************************
//****************************  GLOBAL VARIABLES   *********************************************
//**********************************************************************************************

int CurrentMinute, CurrentHour, CurrentDay, CurrentMonth, CurrentYear, CurrentWeekday;
char daysOfTheWeek[7][12] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};
String months[12] = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"};
BlynkTimer timer;
WidgetRTC rtc;


//**********************************************************************************************
//************************  #defines for Blynk.Edgent  *****************************************
//**********************************************************************************************


#define USE_NODE_MCU_BOARD


//**********************************************************************************************
//**************************  NeoPixel Configuration   *****************************************
//**********************************************************************************************

#define BRIGHTNESS 50 // Set BRIGHTNESS to about 1/5 (max = 255)
#define MSG_COLOR strip.Color(127, 127, 127)
#define HOUR_COLOR strip.Color(255,255,0)
#define MIN_COLOR strip.Color(0,255,255)
#define LED_COUNT  256
#define LED_PIN     12

Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);

//**********************************************************************************************
//**************************  Pin for the LED to turn on and Off  ******************************
//****************************  to verify connection to BLYNK  *********************************
//**********************************************************************************************

#define Blynk_Led_Pin D7


//**********************************************************************************************
//**************************  Processes the minutes into function calls    *********************
//****************************  to light up LEDs   *********************************************
//**********************************************************************************************

void LightMinutes(int CurrentMin)
{
  switch (CurrentMin)
  {
    case 0 ... 4:
      LightHourO();
      LightHourClock();
      break;
    case 5 ... 9:
    case 55 ... 59:
      LightMinFive();
      LightMinMinutes();
      break;
    case 10 ... 14:
    case 50 ... 54:
      LightMinTen();
      LightMinMinutes();
      break;
    case 15 ... 19:
    case 45 ... 49:
      LightMinQuarter();
      break;
    case 20 ... 24:
    case 40 ... 44:
      LightMinTwenty();
      LightMinMinutes();
      break;
    case 25 ... 29:
    case 35 ... 39:
      LightMinTwenty();
      LightMinFive();
      LightMinMinutes();
      break;
    case 30 ... 34:
      LightMinHalf();
      break;
    default:

      break;

  }
  if ((CurrentMin >= 5) && (CurrentMin < 35))
    LightMinPast();
  if (CurrentMin >= 35)
    LightMinTo();

}

//**********************************************************************************************
//**************************  Processes the Hour into function calls    *********************
//****************************  to light up LEDs   *********************************************
//**********************************************************************************************

void LightHour(int CurrentHour)
{
  if (CurrentHour <= 11)
  {
    LightHourIn();
    LightHourThe();
    LightHourMorning();
  }
  if ((CurrentHour > 12) && (CurrentHour < 18))
  {
    LightHourIn();
    LightHourThe();
    LightHourAfternoon();
  }
  if ((CurrentHour >= 18) && (CurrentHour <=21))
  {
    LightHourIn();
    LightHourThe();
    LightHourEvening();
  }
  if ((CurrentHour > 5) && (CurrentHour < 9))
  {
    LightMsgTime();
    LightMsgFor();
    LightMsgCoffee();

    LightMsgGood();
    LightMsgMorning();
  }
  if (CurrentHour >= 21)
  {
    LightMsgTime();
    LightMsgFor();
    LightMsgSleep();
  }

  if (CurrentHour >= 12) CurrentHour = CurrentHour - 12;
  switch (CurrentHour)
  {
    case 0: LightHourTwelve();
      break;
    case 1: LightHourOne();
      break;
    case 2: LightHourTwo();
      break;
    case 3: LightHourThree();
      break;
    case 4: LightHourFour();
      break;
    case 5: LightHourFive();
      break;
    case 6: LightHourSix();
      break;
    case 7: LightHourSeven();
      break;
    case 8: LightHourEight();
      break;
    case 9: LightHourNine();
      break;
    case 10: LightHourTen();
      break;
    case 11: LightHourEleven();
      break;
    case 12: LightHourMidnight();
      break;

    default:
      break;

  }
  //will be sent the hour to display. Just light it up
  //Check for morning, afternoon, sleep , coffee(chai)
}

Those are the declarations and includes. I also included the parsing of the time, I did not include the functions that turn on the LED’s. Imagine a bunch of for loops.

Here is the code:

void Update_Clock()
{
  strip.clear();
  CurrentMinute=minute();
  CurrentHour=hour();
  CurrentDay=day();
  CurrentWeekday=weekday();
  CurrentMonth=month();
  CurrentYear = year();

  
    LightMinutes(CurrentMinute);
  if (CurrentMinute < 35)
  {
    LightHour(CurrentHour);
  }
  else
  {
    LightHour(CurrentHour + 1);

  }
  if (CurrentWeekday == 6)
  {
    LightMsgHappy();
    LightMsgFriday();
  }
  strip.show();
  strip.clear();
  Serial.println(" ");

}

void clockDisplay()
{
  // You can call hour(), minute(), ... at any time
  // Please see Time library examples for details
 
  
  String currentTime = String(hour()) + ":" + minute() + ":" + second();
  String currentDate = String(day()) + " " + month() + " " + year();
  Serial.print("Current time: ");
  Serial.print(currentTime);
  Serial.print(" ");
  Serial.print(currentDate);
  Serial.println();

  // Send time to the App
  Blynk.virtualWrite(V1, currentTime);
  // Send date to the App
  Blynk.virtualWrite(V2, currentDate);
  Blynk.virtualWrite(V3, months[CurrentMonth-1]);
  Blynk.virtualWrite(V4, daysOfTheWeek[CurrentWeekday-1]);

}

//**********************************************************************************************
//******************************  BLYNK action functions  **************************************
//**********************************************************************************************


BLYNK_CONNECTED() {
  // Synchronize time on connection
  rtc.begin();
}


BLYNK_WRITE(V0)
{
  int pinValue = param.asInt();
  digitalWrite(Blynk_Led_Pin,pinValue);
}

BLYNK_WRITE(V6)
{
    colorWipe(strip.Color(  param[0].asInt(),   param[1].asInt(), param[2].asInt()));
}

BLYNK_WRITE(V5)
{
  // Set incoming value from pin V5 to a variable
  int value = param.asInt();
  for (int i = 14; i <= 17; i++) { // For each pixel in strip...
    strip.setPixelColor(i, strip.Color(255*value,0,0));         //  Set pixel's color (in RAM)
  }
}

void setup()
{
  pinMode(Blynk_Led_Pin,OUTPUT);
  Serial.begin(115200);


  BlynkEdgent.begin();
  setSyncInterval(10 * 60); // Sync interval in seconds (10 minutes)

  // Update Blynk.consle clock every 9 seconds
  timer.setInterval(90000L, clockDisplay);
  //Update the LED Clock every 10 seconds
  timer.setInterval(10000L, Update_Clock);

  strip.begin();           // INITIALIZE NeoPixel strip object (REQUIRED)
  strip.show();            // Turn OFF all pixels ASAP
  strip.setBrightness(BRIGHTNESS);
}

void loop() {
  BlynkEdgent.run();
  timer.run();
}

Any and all help is appreciated. I do not know if I used a reserved pin GPIO12 or if I am getting interference from the WIFI transmissions. I am stumped.

There is no RTC widget in Blynk IoT.

Pete.

Thank you for your reply. I mis-spoke I used the following library (not widget):

It seems that is built on the Blynk documentation for how to update the time from the blynk.cloud:

https://docs.blynk.io/en/blynk.edgent/api/rtc-clock

I will hardcode in a time and remove this library to see if that fixes the problem. Any other suggestions are appreciated.

Gary

I don’t think you actually need to specifically include the RTC.h library, as it is referenced internally within the other included files that form part of the Blynk library.

You’ve included a link to the Blynk IoT RTC documentation, but you haven’t actually included any of the code snippets from that documentation within your sketch.

Far better to put the actual required code into your sketch, and print some debug info to the serial monitor to show that it has synchronised correctly.

Pete.

@PeteKnight Here is where I am at. The RTC works great, in spite of that I hardcoded a time (to remove any possible issues or conflicts with the LEDs created by RTC). I have used 3 different NodeMcu8266’s and a D1 Mini. I have tried 3 different brands of WS2812b strip lights. The problem is persisting.

The extra LEDs that light up every time the words on in the clock update (which I have on a timer for every 10 seconds). I cannot discern any pattern. If I take the exact code with blynk removed there are no extra lights. I thought it might be a stack/heap collision but the compiler tells me that I am using 48% of available memory with my program. There should be plenty of space.

I have tried using the Adafruit library, I switched to FastLED library. I have tried every available GPIO. At each turn the random LEDs still persist. The total lack of information on the Internet leads me to think that I am missing something simple, this seems like a fundamental task…Light some LEDS.

Pictures of your LED board don’t really help. Pictures or a schematic of your wiring would be more useful, as would your updated sketch (in full, for any .ino or .h file that has changed from the Edgent example).

At this stage, I’d say that the issue is most likely a conflict between the pins used in the Settings.h file and the pins you are using for the LED strip.

Pete.

@PeteKnight I truly appreciate your patience with me, while I have searched message boards a bunch, this is my first post.

Here is the wiring schematic (sorry for its amateur nature, it was either this or a hand drawing)

As for a pin conflict. I have tried every available GPIO. I also looked into “settings.h” for any reference to pins, this was all I found:

#if defined(USE_NODE_MCU_BOARD) || defined(USE_WEMOS_D1_MINI)

  #define BOARD_BUTTON_PIN            0
  #define BOARD_BUTTON_ACTIVE_LOW     true

  #define BOARD_LED_PIN               2
  #define BOARD_LED_INVERSE           true
  #define BOARD_LED_BRIGHTNESS        255

Here is my most current code. I have commented out all references to the RTC, while I do not believe it is the issue, I removed it and hardcoded a time and date, to be sure. The only libraries left are Blynk and FastLED.



// Fill-in information from your Blynk Template here
#define BLYNK_TEMPLATE_ID "TMPLLvNnYzwL"
#define BLYNK_DEVICE_NAME "LED Blink"

#define BLYNK_FIRMWARE_VERSION        "1.0.1"
#define BLYNK_PRINT Serial
//#define BLYNK_DEBUG

#define APP_DEBUG


//**********************************************************************************************
//****************************************  Libraries  *****************************************
//**********************************************************************************************
#include "BlynkEdgent.h"
//#include <TimeLib.h>  Removed for debugging
//#include <WidgetRTC.h>  Removed for debugging
#include <FastLED.h>



//**********************************************************************************************
//****************************  GLOBAL VARIABLES   *********************************************
//**********************************************************************************************

int CurrentMinute, CurrentHour, CurrentDay, CurrentMonth, CurrentYear, CurrentWeekday;
char daysOfTheWeek[7][12] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};
String months[12] = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"};
BlynkTimer timer;
//WidgetRTC rtc; Removed for debugging


//**********************************************************************************************
//************************  #defines for Blynk.Edgent  *****************************************
//**********************************************************************************************


#define USE_NODE_MCU_BOARD
//#define USE_WEMOS_D1_MINI


//**********************************************************************************************
//**************************  FastLED Configuration   *****************************************
//**********************************************************************************************

#define BRIGHTNESS 50 // Set BRIGHTNESS to about 1/5 (max = 255)
#define MSG_COLOR CRGB::Red
#define HOUR_COLOR CRGB::Blue
#define MIN_COLOR CRGB::Purple
#define LED_COUNT  256
#define LED_PIN     12

CRGB leds[LED_COUNT];



//**********************************************************************************************
//**************************  Pin for the LED to turn on and Off  ******************************
//****************************  to verify connection to BLYNK  *********************************
//**********************************************************************************************

#define Blynk_Led_Pin D7


//**********************************************************************************************
//**************************  Processes the minutes into function calls    *********************
//****************************  to light up LEDs   *********************************************
//**********************************************************************************************

void LightMinutes(int CurrentMin)
{
  switch (CurrentMin)
  {
    case 0 ... 4:
      LightHourO();
      LightHourClock();
      break;
    case 5 ... 9:
    case 55 ... 59:
      LightMinFive();
      LightMinMinutes();
      break;
    case 10 ... 14:
    case 50 ... 54:
      LightMinTen();
      LightMinMinutes();
      break;
    case 15 ... 19:
    case 45 ... 49:
      LightMinQuarter();
      break;
    case 20 ... 24:
    case 40 ... 44:
      LightMinTwenty();
      LightMinMinutes();
      break;
    case 25 ... 29:
    case 35 ... 39:
      LightMinTwenty();
      LightMinFive();
      LightMinMinutes();
      break;
    case 30 ... 34:
      LightMinHalf();
      break;
    default:

      break;

  }
  if ((CurrentMin >= 5) && (CurrentMin < 35))
    LightMinPast();
  if (CurrentMin >= 35)
    LightMinTo();

}

//**********************************************************************************************
//**************************  Processes the Hour into function calls    *********************
//****************************  to light up LEDs   *********************************************
//**********************************************************************************************

void LightHour(int CurrentHour)
{
  if (CurrentHour <= 11)
  {
    LightHourIn();
    LightHourThe();
    LightHourMorning();
  }
  if ((CurrentHour > 12) && (CurrentHour < 18))
  {
    LightHourIn();
    LightHourThe();
    LightHourAfternoon();
  }
  if ((CurrentHour >= 18) && (CurrentHour <=21))
  {
    LightHourIn();
    LightHourThe();
    LightHourEvening();
  }
  if ((CurrentHour > 5) && (CurrentHour < 9))
  {
    LightMsgTime();
    LightMsgFor();
    LightMsgCoffee();

    LightMsgGood();
    LightMsgMorning();
  }
  if (CurrentHour >= 21)
  {
    LightMsgTime();
    LightMsgFor();
    LightMsgSleep();
  }

  if (CurrentHour >= 12) CurrentHour = CurrentHour - 12;
  switch (CurrentHour)
  {
    case 0: LightHourTwelve();
      break;
    case 1: LightHourOne();
      break;
    case 2: LightHourTwo();
      break;
    case 3: LightHourThree();
      break;
    case 4: LightHourFour();
      break;
    case 5: LightHourFive();
      break;
    case 6: LightHourSix();
      break;
    case 7: LightHourSeven();
      break;
    case 8: LightHourEight();
      break;
    case 9: LightHourNine();
      break;
    case 10: LightHourTen();
      break;
    case 11: LightHourEleven();
      break;
    case 12: LightHourMidnight();
      break;

    default:
      break;

  }
  //will be sent the hour to display. Just light it up
  //Check for morning, afternoon, sleep , coffee(chai)
}


/*   ***********************************  Hour Lighting Functions ********************************
 *   ***********************************  Hour Lighting Functions ********************************
 *   ***********************************  Hour Lighting Functions ********************************
 *   ***********************************  Hour Lighting Functions ********************************
 *   ***********************************  Hour Lighting Functions ********************************
*/

void LightHourOne()
{
      for (int i = 128; i <= 130; i++) { // For each pixel in strip...
    leds[i]=HOUR_COLOR;         //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
  Serial.print("One ");
#endif

}
void LightHourTwo()
{
        for (int i = 131; i <= 133; i++) { // For each pixel in strip...
    leds[i]=HOUR_COLOR;         //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
  Serial.print("Two ");
#endif
}
void LightHourThree()
{
        for (int i = 134; i <= 138; i++) { // For each pixel in strip...
    leds[i]=HOUR_COLOR;         //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
  Serial.print("Three ");
#endif
}
void LightHourFour()
{
        for (int i = 160; i <= 163; i++) { // For each pixel in strip...
    leds[i]=HOUR_COLOR;         //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
  Serial.print("Four ");
#endif
}
void LightHourFive()
{
        for (int i = 156; i <= 159; i++) { // For each pixel in strip...
    leds[i]=HOUR_COLOR;         //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
  Serial.print("Five ");
#endif
}
void LightHourSix()
{
        for (int i = 165; i <= 167; i++) { // For each pixel in strip...
    leds[i]=HOUR_COLOR;         //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
  Serial.print("Six ");
#endif
}
void LightHourSeven()
{
        for (int i = 168; i <= 172; i++) { // For each pixel in strip...
    leds[i]=HOUR_COLOR;         //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
  Serial.print("Seven ");
#endif
}
void LightHourEight()
{
        for (int i = 139; i <= 143; i++) { // For each pixel in strip...
    leds[i]=HOUR_COLOR;         //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
  Serial.print("Eight ");
#endif
}
void LightHourNine()
{
        for (int i = 144; i <= 147; i++) { // For each pixel in strip...
    leds[i]=HOUR_COLOR;         //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
  Serial.print("Nine ");
#endif
}
void LightHourTen()
{
        for (int i = 173; i <= 175; i++) { // For each pixel in strip...
    leds[i]=HOUR_COLOR;         //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
  Serial.print("Ten ");
#endif
}
void LightHourEleven()
{
        for (int i = 148; i <= 153; i++) { // For each pixel in strip...
    leds[i]=HOUR_COLOR;         //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
  Serial.print("Eleven ");
#endif
}
void LightHourTwelve()
{
        for (int i = 186; i <= 191; i++) { // For each pixel in strip...
    leds[i]=HOUR_COLOR;         //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
  Serial.print("Twelve ");
#endif
}
void LightHourO()
{
    leds[176]= HOUR_COLOR;         //  Set pixel's color (in RAM)
#if DEBUG ==TRUE
  Serial.print("O ");
#endif
}
void LightHourClock()
{
        for (int i = 176; i <= 181; i++) { // For each pixel in strip...
    leds[i]=HOUR_COLOR;         //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
  Serial.print("Clock ");
#endif
}
void LightHourMidnight()
{
        for (int i = 192; i <= 199; i++) { // For each pixel in strip...
    leds[i]=HOUR_COLOR;         //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
  Serial.print("Midnight ");
#endif
}
void LightHourIn()
{
        for (int i = 200; i <= 201; i++) { // For each pixel in strip...
    leds[i]=HOUR_COLOR;         //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
  Serial.print("In ");
#endif
}
void LightHourThe()
{
        for (int i = 205; i <= 207; i++) { // For each pixel in strip...
    leds[i]=HOUR_COLOR;         //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
  Serial.print("The ");
#endif
}
void LightHourBuilt()
{
        for (int i = 219; i <= 223; i++) { // For each pixel in strip...
    leds[i]=HOUR_COLOR;         //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
  Serial.print("Built ");
#endif
}
void LightHourMorning()
{
        for (int i = 212; i <= 218; i++) { // For each pixel in strip...
    leds[i]=HOUR_COLOR;         //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
  Serial.print("Morning ");
#endif
}
void LightHourWith()
{
        for (int i = 208; i <= 211; i++) { // For each pixel in strip...
    leds[i]=HOUR_COLOR;         //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
  Serial.print("With ");
#endif
}
void LightHourLove()
{
        for (int i = 224; i <= 227; i++) { // For each pixel in strip...
    leds[i]=HOUR_COLOR;         //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
  Serial.print("Love ");
#endif
}
void LightHourAfternoon()
{
        for (int i = 228; i <= 236; i++) { // For each pixel in strip...
    leds[i]=HOUR_COLOR;         //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
  Serial.print("Afternoon ");
#endif
}
void LightHourYou()
{
        for (int i = 237; i <= 239; i++) { // For each pixel in strip...
    leds[i]=HOUR_COLOR;         //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
  Serial.print("You ");
#endif
}
void LightHourBy()
{
        for (int i = 254; i <= 255; i++) { // For each pixel in strip...
    leds[i]=HOUR_COLOR;         //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
  Serial.print("By ");
#endif
}
void LightHourEvening()
{
        for (int i = 247; i <= 253; i++) { // For each pixel in strip...
    leds[i]=HOUR_COLOR;         //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
  Serial.print("Evening ");
#endif
}
void LightHourGary()
{
        for (int i = 240; i <= 244; i++) { // For each pixel in strip...
    leds[i]=HOUR_COLOR;         //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
  Serial.print("Gary ");
#endif
}

/*
 * ***********************************  Minute Lighting Functions ********************************
 * ***********************************  Minute Lighting Functions ********************************
 * ***********************************  Minute Lighting Functions ********************************
 * ***********************************  Minute Lighting Functions ********************************
*/

void LightMinTen()
{
    for (int i = 86; i <= 88; i++) { // For each pixel in strip...
    leds[i]=MIN_COLOR;         //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
  Serial.print("Ten ");
#endif
}

void LightMinTwenty()
{
    for (int i = 80; i <= 85; i++) { // For each pixel in strip...
    leds[i]=MIN_COLOR;         //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
  Serial.print("Twenty ");
#endif
}

void LightMinHalf()
{
    for (int i = 96; i <= 99; i++) { // For each pixel in strip...
    leds[i]=MIN_COLOR;         //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
  Serial.print("Half ");
#endif
}

void LightMinFive()
{
    for (int i = 101; i <= 104; i++) { // For each pixel in strip...
    leds[i]=MIN_COLOR;         //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
  Serial.print("Five ");
#endif
}

void LightMinQuarter()
{
      for (int i = 105; i <= 111; i++) { // For each pixel in strip...
    leds[i]=MIN_COLOR;         //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
  Serial.print("Quarter ");
#endif
}

void LightMinMinutes()
{
    for (int i = 121; i <= 127; i++) { // For each pixel in strip...
    leds[i]=MIN_COLOR;         //  Set pixel's color (in RAM)
  }
  
#if DEBUG ==TRUE
  Serial.print("Minutes ");
#endif
}

void LightMinThis()
{
      for (int i = 117; i <= 120; i++) { // For each pixel in strip...
    leds[i]=MIN_COLOR;         //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
  Serial.print("Minutes ");
#endif
}

void LightMinPast()
{
      for (int i = 113; i <= 116; i++) { // For each pixel in strip...
    leds[i]=MIN_COLOR;         //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
  Serial.print("Past ");
#endif
}

void LightMinTo()
{
      for (int i = 112; i <= 113; i++) { // For each pixel in strip...
    leds[i]=MIN_COLOR;         //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
  Serial.print("To ");
#endif
}
/*
 * ***************************************  Message (msg) functions ***************************************
 * ***************************************  Message (msg) functions ***************************************
 * ***************************************  Message (msg) functions ***************************************
 * ***************************************  Message (msg) functions ***************************************
 * ***************************************  Message (msg) functions ***************************************
*/

void LightMsgGood()
{
  for (int i = 0; i <= 3; i++) { // For each pixel in strip...
    leds[i]=MSG_COLOR;        //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
  Serial.print("Good ");
#endif
}
void LightMsgHi()
{
  for (int i = 4; i <= 5; i++) { // For each pixel in strip...
    leds[i]=MSG_COLOR;        //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
  Serial.print("Hi ");
#endif
}
void LightMsgMorning()
{
  for (int i = 24; i <= 31; i++) { // For each pixel in strip...
    leds[i]=MSG_COLOR;        //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
  Serial.print("Morning ");
#endif
}

void LightMsgTime()
{
  for (int i = 32; i <= 35; i++) { // For each pixel in strip...
    leds[i]=MSG_COLOR;        //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
  Serial.print("Time ");
#endif
}

void LightMsgCarpe()
{
  for (int i = 36; i <= 40; i++) { // For each pixel in strip...
    leds[i]=MSG_COLOR;        //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
  Serial.print("Carpe ");
#endif
}

void LightMsgFor()
{
  for (int i = 41; i <= 43; i++) { // For each pixel in strip...
    leds[i]=MSG_COLOR;        //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
  Serial.print("For ");
#endif
}

void LightMsgDiem()
{
  for (int i = 44; i <= 47; i++) { // For each pixel in strip...
    leds[i]=MSG_COLOR;        //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
  Serial.print("Diem ");
#endif
}
void LightMsgHappy()
{
  for (int i = 59; i <= 63; i++) { // For each pixel in strip...
    leds[i]=MSG_COLOR;        //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
  Serial.print("Happy ");
#endif
}

void LightMsgSleep()
{
  for (int i = 54; i <= 58; i++) { // For each pixel in strip...
    leds[i]=MSG_COLOR;        //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
  Serial.print("Sleep ");
#endif
}

void LightMsgCoffee()
{
  for (int i = 48; i <= 51; i++) { // For each pixel in strip...
    leds[i]=MSG_COLOR;        //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
  Serial.print("Chai ");
#endif
}

void LightMsgFriday()
{
  for (int i = 66; i <= 71; i++) { // For each pixel in strip...
    leds[i]=MSG_COLOR;        //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
Serial.print("Friday ");
#endif
}

void LightMsgBirthday()
{
  for (int i = 72; i <= 79; i++) { // For each pixel in strip...
    leds[i]=MSG_COLOR;        //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
  Serial.print("Birthday ");
#endif
}
void LightMsgMarci()
{
  for (int i = 90; i <= 94; i++) { // For each pixel in strip...
    leds[i]=MSG_COLOR;        //  Set pixel's color (in RAM)
  }
#if DEBUG ==TRUE
  Serial.print("Marci ");
#endif
}
/*
 * *****************************   Special Checks  ************
 * *****************************   Special Checks  ************
 * *****************************   Special Checks  ************
 * *****************************   Special Checks  ************
 * *****************************   Special Checks  ************
*/
void CheckBirthday(int CurrentMonth, int CurrentDay)
{
  if ((CurrentMonth == 12) && (CurrentDay == 31))
  {
    LightMsgHappy();  //Change these to be assigned to vertual pins with values for flexibility.
    LightMsgBirthday();
    LightMsgMarci();
  }
}

void CheckAnniversary( int CurrentMonth, int CurrentDay)
{ //Change these to virtual pins in BLYNK.
  if ((CurrentMonth == 7) && (CurrentDay == 11))
  {
    LightHourBuilt();
    LightHourWith();
    LightHourLove();
    LightHourBy();
    LightHourGary();
  }
}

void LightHappyFriday()
{
  LightMsgHappy();
  LightMsgFriday();
}






void Update_Clock()
{
/* Removed for Debugging
  CurrentMinute=minute();
  CurrentHour=hour();
  CurrentDay=day();
  CurrentWeekday=weekday();
  CurrentMonth=month();
  CurrentYear = year();
*/
  CurrentMinute=37;
  CurrentHour=11;
  CurrentDay=22;
  CurrentWeekday=6;
  CurrentMonth=1;
  CurrentYear = 2022;
  
    LightMinutes(CurrentMinute);
  if (CurrentMinute < 35)
  {
    LightHour(CurrentHour);
  }
  else
  {
    LightHour(CurrentHour + 1);

  }
  if (CurrentWeekday == 6)
  {
    LightMsgHappy();
    LightMsgFriday();
  }
  FastLED.show();
  FastLED.clear();
  Serial.println(" ");

}

void clockDisplay()
{
/****** Updates Blynk with the current information ******/
 
  /* Removed for Debugging
  String currentTime = String(hour()) + ":" + minute() + ":" + second();
  String currentDate = String(day()) + " " + month() + " " + year();
  Serial.print("Current time: ");
  Serial.print(currentTime);
  Serial.print(" ");
  Serial.print(currentDate);
  Serial.println();
  

  // Send time to the App
  Blynk.virtualWrite(V1, currentTime);
  // Send date to the App
  Blynk.virtualWrite(V2, currentDate);
  Blynk.virtualWrite(V3, months[CurrentMonth-1]);
  Blynk.virtualWrite(V4, daysOfTheWeek[CurrentWeekday-1]);
*/
}

//**********************************************************************************************
//******************************  BLYNK action functions  **************************************
//**********************************************************************************************


BLYNK_CONNECTED() {
  // Synchronize time on connection
//  rtc.begin();  Removed for Debugging
}


BLYNK_WRITE(V0)
{
  int pinValue = param.asInt();
  digitalWrite(Blynk_Led_Pin,pinValue); //This LED is to verify connectivity with Blynk
 // colorWipe(strip.Color(  255,   0, 255));
}


BLYNK_WRITE(V5)
{
  // Set incoming value from pin V5 to a variable
  int value = param.asInt();
  for (int i = 14; i <= 17; i++) { // For each pixel in strip...
    leds[i]=CRGB::Red;        //  Set pixel's color (in RAM)
  }
}

void setup()
{
  pinMode(Blynk_Led_Pin,OUTPUT);
  pinMode(LED_PIN, OUTPUT);
  Serial.begin(115200);


  BlynkEdgent.begin();
//  setSyncInterval(10 * 60); // Sync interval in seconds (10 minutes) Removed for debugging

  // Update Blynk.consle clock every 9 seconds
  timer.setInterval(90000L, clockDisplay);
  //Update the LED Clock every 2 seconds for more frequent update to troubleshoot
  timer.setInterval(2000L, Update_Clock);
  FastLED.addLeds<NEOPIXEL, LED_PIN>(leds, LED_COUNT);

}

void loop() {
  BlynkEdgent.run();
  timer.run();
}


// Fill strip pixels one after another with a color. Strip is NOT cleared
// first; anything there will be covered pixel by pixel. Pass in color
// (as a single 'packed' 32-bit value, which you can get by calling
// strip.Color(red, green, blue) as shown in the loop() function above),
// and a delay time (in milliseconds) between pixels.
void colorWipe(uint32_t color) {
  for (int i = 0; i < LED_COUNT; i++) { // For each pixel in strip...
    leds[i]=CRGB::Blue;         //  Set pixel's color (in RAM)
                              //  Update strip to match
  }
  FastLED.show();
}

I have not changed any .h or .ino from any library.

All the examples/tutorials I have found are either not for Blynk 2.0, light only one LED, or make the entire strip the same color. I would be happy to rebuild my sketch around an example that worked.

Thanks again for your help.

I was talking about the Edgent example sketch, not the libraries.
Clearly the .ino file has changed from the example, as you’ve posted it above.

Your diagram doesn’t show any connection to pin D7 (GPIO13).

I’d probably add a 10k pullup/down resistor to pin D6 to ensure that it isn’t floating.

Do you need the Edgent functionality?
Have you tried simply adding this…

plus your Blynk IoT auth token to a legacy sketch?

Pete.

@PeteKnight Thank you for your patience and help. My programming skills are only fair and I have no one to bounce ideas off.

I have it working, at the cost of having to hardcode the network and password. Although I believe with a little reading I will be able to give WiFi credentials with WIFI and AP+STA mode, that is for another post.

I used this example:

https://github.com/blynkkk/blynk-library/blob/master/examples/More/ArduinoClient/ESP8266_WiFi/ESP8266_WiFi.ino

and the Adafruit library and it is working fine, with no flicker or extra lights. The FastLED library did not work as it would always light the first LED.

I removed the external LED on D7 and used the onboard LED on GPIO16.

I wish this journey would have been easier, I have never posted on boards because of the trolls, but I am glad I did. Thank You for your help and persistence!

Not sure how to mark this thread solved.

-Gary