user10995: I have a strip of 7 leds. its ws2812. Im starting them on blue. Next I want them to do a slow fade into pink. So all Im trying right now is to increment r.
I can get them to work one by one. But I need them to all fade together from blue to pink. 
Ive moved my r++ loop around till I was cross-eyed. Still it didnt fade all 7 leds to pink all at once.
sometimes it would stay blue and do nothing sometimes fade to pink one pixel at a time.
How do I get all 7 leds to fade together?
Thank you.
#include <FastLED.h>
#define NUM_LEDS 7
#define DATA_PIN 6
#define BRIGHTNESS 45
#define COLOR_ORDER GRB
#define g 50
#define b 100

int r; //changed it to undefined

CRGB leds[NUM_LEDS];

void setup(){
FastLED.addLeds<WS2812, DATA_PIN, GRB>(leds, NUM_LEDS);

 }
void loop(){

this lights all leds to blue
  for(int x = 0; x < NUM_LEDS; x++){

  leds[x] = CRGB(r,g,b);
 }
  FastLED.show();
  delay(10);

this code should grab all 7 leds in NUM_LEDS store it in x
  for(int x = 0; x < NUM_LEDS; x++){



  leds[x] = CRGB(r,g,b);

Heres the problem area. I get no errors but it doesnt fade all 7 leds at a time.
Ive tried moving my code around but it either doesnt fade or fades to pink one led at a time. where should my 'for loop' for incrementing r be at?
Should I be changing rgb all at once using array?
//take r and fade it up to 254


for(int r = 0; r < 254; r++) {


  }
  }
     FastLED.show();
 delay(100);    

}


user7859: If you want to fade all the LEDs form blue to red at the same time, I think you want code like this (explanatory comments embedded)...
#include <FastLED.h>
#define DATA_PIN 6
#define NUM_LEDS 7

#define COLOR_ORDER GRB

CRGB leds[NUM_LEDS];

void setup(){
  FastLED.addLeds<WS2811, DATA_PIN, GRB>(leds, NUM_LEDS);

}

void loop(){

  // Let's take 256 steps to get from blue to red
  // (the most possible with an LED with 8 bit RGB values)

  for( int colorStep=0; colorStep<256; colorStep++ ) {

      int r = colorStep;  // Redness starts at zero and goes up to full
      int b = 255-colorStep;  // Blue starts at full and goes down to zero
      int g = 0;              // No green needed to go from blue to red

      // Now loop though each of the LEDs and set each one to the current color

      for(int x = 0; x < NUM_LEDS; x++){
          leds[x] = CRGB(r,g,b);
      }



      // Display the colors we just set on the actual LEDs
      FastLED.show();

      delay(10); 
  }

}


10995: <p>I have a strip of 7 leds. its ws2812. Im starting them on blue. Next I want them to do a slow fade into pink. So all Im trying right now is to increment r.</p>

<p>I can get them to work one by one. But I need them to all fade together from blue to pink. </p>

<p>Ive moved my r++ loop around till I was cross-eyed. Still it didnt fade all 7 leds to pink all at once.</p>

<p>sometimes it would stay blue and do nothing sometimes fade to pink one pixel at a time.</p>

<p>How do I get all 7 leds to fade together?
Thank you.</p>

<pre><code>#include &lt;FastLED.h&gt;
#define NUM_LEDS 7
#define DATA_PIN 6
#define BRIGHTNESS 45
#define COLOR_ORDER GRB
#define g 50
#define b 100

int r; //changed it to undefined

CRGB leds[NUM_LEDS];

void setup(){
FastLED.addLeds&lt;WS2812, DATA_PIN, GRB&gt;(leds, NUM_LEDS);

 }
void loop(){
</code></pre>

<p>this lights all leds to blue</p>

<pre><code>  for(int x = 0; x &lt; NUM_LEDS; x++){

  leds[x] = CRGB(r,g,b);
 }
  FastLED.show();
  delay(10);
</code></pre>

<p>this code should grab all 7 leds in NUM_LEDS store it in x</p>

<pre><code>  for(int x = 0; x &lt; NUM_LEDS; x++){



  leds[x] = CRGB(r,g,b);
</code></pre>

<p>Heres the problem area. I get no errors but it doesnt fade all 7 leds at a time.
Ive tried moving my code around but it either doesnt fade or fades to pink one led at a time. where should my 'for loop' for incrementing r be at?
Should I be changing rgb all at once using array?</p>

<pre><code>//take r and fade it up to 254


for(int r = 0; r &lt; 254; r++) {


  }
  }
     FastLED.show();
 delay(100);    

}
</code></pre>
 7859: <p>If you want to fade all the LEDs form blue to red at the same time, I think you want code like this (explanatory comments embedded)...</p>

<pre><code>#include &lt;FastLED.h&gt;
#define DATA_PIN 6
#define NUM_LEDS 7

#define COLOR_ORDER GRB

CRGB leds[NUM_LEDS];

void setup(){
  FastLED.addLeds&lt;WS2811, DATA_PIN, GRB&gt;(leds, NUM_LEDS);

}

void loop(){

  // Let's take 256 steps to get from blue to red
  // (the most possible with an LED with 8 bit RGB values)

  for( int colorStep=0; colorStep&lt;256; colorStep++ ) {

      int r = colorStep;  // Redness starts at zero and goes up to full
      int b = 255-colorStep;  // Blue starts at full and goes down to zero
      int g = 0;              // No green needed to go from blue to red

      // Now loop though each of the LEDs and set each one to the current color

      for(int x = 0; x &lt; NUM_LEDS; x++){
          leds[x] = CRGB(r,g,b);
      }



      // Display the colors we just set on the actual LEDs
      FastLED.show();

      delay(10); 
  }

}
</code></pre>
