user31694: I've been trying to implement this old code that randomly transitions to RGB color into my Arduino board that uses FastLED.
Static Col1, Col2, Col3 As Integer
Static C1, C2, C3 As Integer
If (Col1 = 0 Or Col1 = 250) And (Col2 = 0 Or Col2 = 250) And (Col3 = 0 Or Col3 = 250) Then
  C1 = Int(Rnd * 3)
  C2 = Int(Rnd * 3)
  C3 = Int(Rnd * 3)
End If
If C1 = 1 And Col1 <> 0 Then Col1 = Col1 - 10
If C2 = 1 And Col2 <> 0 Then Col2 = Col2 - 10
If C3 = 1 And Col3 <> 0 Then Col3 = Col3 - 10
If C1 = 2 And Col1 <> 250 Then Col1 = Col1 + 10
If C2 = 2 And Col2 <> 250 Then Col2 = Col2 + 10
If C3 = 2 And Col3 <> 250 Then Col3 = Col3 + 10
leds[x] = RGB(Col1, Col2, Col3)

Here is my Arduino setup: 
#include <FastLED.h>

#define LED_COUNT 60
#define LED_OUT       13
#define BUTTON_IN     10
#define ANALOG_INPUT  A9
#define EXTRA_PIN_A    7
#define EXTRA_PIN_B   11

struct CRGB leds[LED_COUNT];

void setup() {
  Serial.begin(57600);
  LEDS.addLeds<WS2812B, LED_OUT, GRB>(leds, LED_COUNT);
  LEDS.show();
}

void loop() {
  //where to implement 
}


user31694: I think this should work fine:
#include <FastLED.h>

#define LED_COUNT     96
#define LED_OUT       13
#define BUTTON_IN     10
#define ANALOG_INPUT  A9
#define EXTRA_PIN_A    7
#define EXTRA_PIN_B   11

struct CRGB leds[LED_COUNT];

void setup() {
  Serial.begin(57600);
  LEDS.addLeds<WS2812B, LED_OUT, GRB>(leds, LED_COUNT);
  LEDS.show();
}

void colorLoop() {  

  static int Col1;
  static int Col2;
  static int Col3;

  static int C1;
  static int C2;
  static int C3;

if ((((Col1 == 0) || (Col1 == 250)) && (((Col2 == 0) || (Col2 == 250)) && ((Col3 == 0) || (Col3 == 250))))) {

// select a random number from 1 to 2 for the array
C1 = random(1, 3);
C2 = random(1, 3);
C3 = random(1, 3);
}

if (((C1 == 1) && (Col1 != 0))) {
    Col1 = (Col1 - 10);
}
if (((C2 == 1) && (Col2 != 0))) {
    Col2 = (Col2 - 10);
}
if (((C3 == 1) && (Col3 != 0))) {
    Col3 = (Col3 - 10);
}


if (((C1 == 2) && (Col1 != 250))) {
    Col1 = (Col1 + 10);
}
if (((C2 == 2) && (Col2 != 250))) {
    Col2 = (Col2 + 10);
}
if (((C3 == 2) && (Col3 != 250))) {
    Col3 = (Col3 + 10);
}

for (uint8_t i = 0; i < LED_COUNT; i++) {
   leds[i] = CRGB(Col1, Col2, Col3);
  }
delay(100);
LEDS.show();
}

void loop() {
  colorLoop();
}


31694: <p>I've been trying to implement this old code that randomly transitions to RGB color into my Arduino board that uses FastLED.</p>

<pre><code>Static Col1, Col2, Col3 As Integer
Static C1, C2, C3 As Integer
If (Col1 = 0 Or Col1 = 250) And (Col2 = 0 Or Col2 = 250) And (Col3 = 0 Or Col3 = 250) Then
  C1 = Int(Rnd * 3)
  C2 = Int(Rnd * 3)
  C3 = Int(Rnd * 3)
End If
If C1 = 1 And Col1 &lt;&gt; 0 Then Col1 = Col1 - 10
If C2 = 1 And Col2 &lt;&gt; 0 Then Col2 = Col2 - 10
If C3 = 1 And Col3 &lt;&gt; 0 Then Col3 = Col3 - 10
If C1 = 2 And Col1 &lt;&gt; 250 Then Col1 = Col1 + 10
If C2 = 2 And Col2 &lt;&gt; 250 Then Col2 = Col2 + 10
If C3 = 2 And Col3 &lt;&gt; 250 Then Col3 = Col3 + 10
leds[x] = RGB(Col1, Col2, Col3)
</code></pre>

<p>Here is my Arduino setup: </p>

<pre><code>#include &lt;FastLED.h&gt;

#define LED_COUNT 60
#define LED_OUT       13
#define BUTTON_IN     10
#define ANALOG_INPUT  A9
#define EXTRA_PIN_A    7
#define EXTRA_PIN_B   11

struct CRGB leds[LED_COUNT];

void setup() {
  Serial.begin(57600);
  LEDS.addLeds&lt;WS2812B, LED_OUT, GRB&gt;(leds, LED_COUNT);
  LEDS.show();
}

void loop() {
  //where to implement 
}
</code></pre>
 31694: <p>I think this should work fine:</p>

<pre><code>#include &lt;FastLED.h&gt;

#define LED_COUNT     96
#define LED_OUT       13
#define BUTTON_IN     10
#define ANALOG_INPUT  A9
#define EXTRA_PIN_A    7
#define EXTRA_PIN_B   11

struct CRGB leds[LED_COUNT];

void setup() {
  Serial.begin(57600);
  LEDS.addLeds&lt;WS2812B, LED_OUT, GRB&gt;(leds, LED_COUNT);
  LEDS.show();
}

void colorLoop() {  

  static int Col1;
  static int Col2;
  static int Col3;

  static int C1;
  static int C2;
  static int C3;

if ((((Col1 == 0) || (Col1 == 250)) &amp;&amp; (((Col2 == 0) || (Col2 == 250)) &amp;&amp; ((Col3 == 0) || (Col3 == 250))))) {

// select a random number from 1 to 2 for the array
C1 = random(1, 3);
C2 = random(1, 3);
C3 = random(1, 3);
}

if (((C1 == 1) &amp;&amp; (Col1 != 0))) {
    Col1 = (Col1 - 10);
}
if (((C2 == 1) &amp;&amp; (Col2 != 0))) {
    Col2 = (Col2 - 10);
}
if (((C3 == 1) &amp;&amp; (Col3 != 0))) {
    Col3 = (Col3 - 10);
}


if (((C1 == 2) &amp;&amp; (Col1 != 250))) {
    Col1 = (Col1 + 10);
}
if (((C2 == 2) &amp;&amp; (Col2 != 250))) {
    Col2 = (Col2 + 10);
}
if (((C3 == 2) &amp;&amp; (Col3 != 250))) {
    Col3 = (Col3 + 10);
}

for (uint8_t i = 0; i &lt; LED_COUNT; i++) {
   leds[i] = CRGB(Col1, Col2, Col3);
  }
delay(100);
LEDS.show();
}

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