FastLED NeoPixel, Glitch every 15 seconds [Solved]

I'm setting up my LED strip and I've noticed that about every 15 seconds all the defined LED's glitch. (in this case, the first 5)
The glitch looks like a randomixed rainbow effect and takes about 2 seconds, after which the normal (blinking) loop continues.

Does anyone know what causes this? And how to fix it?

My setup consists of an Arduino Uno that's connected to my laptop and the LED's (with an ohm resistor between the Arduino and LED's)
The LED's are connected to a 5v 12a power supply.

For testing I'm using a simple fastled Library example, here's my code:

/// @file    Blink.ino
/// @brief   Blink the first LED of an LED strip
/// @example Blink.ino

#include <FastLED.h>

// How many leds in your strip?
#define NUM_LEDS 5


#define DATA_PIN 6


// Define the array of leds
CRGB leds[NUM_LEDS];

void setup() { 
    // ## Clockless types ##
    FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);  // GRB ordering is assumed
    FastLED.clear();
}

void loop() { 
  // Turn the LED on, then pause
  leds[0] = CRGB::Red;
  FastLED.show();
  delay(500);
  // Now turn the LED off, then pause
  leds[0] = CRGB::Black;
  FastLED.show();
  delay(500);
}

I've found my solution

I didn't connect the LED ground wire to my arduino.
It seems to have been fixed now that I've done that.

Here's a video that explains how to set this up with ground wire:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.