Hello!
I finally got my segmented gradient effect working. Only thing missing is a flickering effect like in this video
NeoPixel Fire Effect! - YouTube but for the FastLED library.
Just writing "flicker" won't do anything sadly, could someone please write me that line of code I need to paste it on top of my gradient effect? Would be much appreciated!
Here is my code, I am using a Trinket Pro 5V and a WS2812 LED strip.
#include "FastLED.h" // FastLED library.
#if FASTLED_VERSION < 3001000
#error "Requires FastLED 3.1 or later; check github for latest code."
#endif
#define LED_DT 6 // Data pin to connect to the strip.
#define COLOR_ORDER GRB // It's GRB for WS2812
#define LED_TYPE WS2812 // Using WS2812. Don't forget to change LEDS.addLeds.
#define NUM_LEDS 64 // Number of LED's.
uint8_t max_bright = 500; // Overall brightness definition. It can be changed on the fly.
struct CRGB leds[NUM_LEDS]; // Initialize our LED array.
// Colours defined for below
CRGB rgbval(255,85,0);
uint8_t startpos = 0;
int endpos = NUM_LEDS-1;
void setup() {
Serial.begin(115200); // Initialize serial port for debugging.
delay(1000); // Soft startup to ease the flow of electrons.
LEDS.addLeds<WS2812, LED_DT, COLOR_ORDER>(leds, NUM_LEDS); // Use this for WS2812
FastLED.setBrightness(max_bright);
FastLED.setMaxPowerInVoltsAndMilliamps(5, 500);
} // setup()
void loop () {
fill_solid(leds,25, CRGB::Red);
fill_solid(leds+25, 39, rgbval);
fill_gradient_RGB(leds+25, 21, CRGB(255,0,0), CRGB(255,85,0));
FastLED.show(); // Power managed display
} // loop()