@hans
I have tried to fix the CApTCHA with no success. This is a another computor.
I have modified certain lines to reflect the ws2812 and the pin number.
I have an error on line 52. I have compare other code with no success, Why is it stopping at this line when all the others are the same at the exception of the strip number.
#include <FastLED.h>
#define STRIP1_NUM_LEDS 36 // 18 LED/feet or 30cm. correct for the actual LED counts of the strips. 60 MA // /LED
#define STRIP2_NUM_LEDS 48
#define STRIP3_NUM_LEDS 72
//CRGB leds1[STRIP1_NUM_LEDS];
//CRGB leds2[STRIP2_NUM_LEDS];
//CRGB leds3[STRIP3_NUM_LEDS];
#define STRIP1_PIN 6
#define STRIP2_PIN 7
#define STRIP3_PIN 8
int Strip1Position = 0;
int Strip2Position = 0; // GRB ordering is assumed
int Strip3Position = 0;
//void setup() // void setup is already preiously noted
//{ // void setup is already preiously noted
FastLED.addLeds < WS2812, STRIP1_PIN, GRB > (leds1, STRIP1_NUM_LEDS).setCorrection( TypicalLEDStrip );
FastLED.addLeds < WS2812, STRIP2_PIN, GRB > (leds2, STRIP2_NUM_LEDS).setCorrection( TypicalLEDStrip );
FastLED.addLeds < WS2812, STRIP3_PIN, GRB > (leds3, STRIP3_NUM_LEDS).setCorrection( TypicalLEDStrip );
}
void loop() {
meteorRain(0xff, 0xff, 0xff, 10, 64, true, 30);
}
void meteorRain(byte red, byte green, byte blue, byte meteorSize, byte meteorTrailDecay, boolean meteorRandomDecay, int SpeedDelay) {
if (Strip1Position==0) { fill_solid( leds1, STRIP1_NUM_LEDS, CRGB(0,0,0)); }
if (Strip2Position==0) { fill_solid( leds2, STRIP2_NUM_LEDS, CRGB(0,0,0)); }
if (Strip3Position==0) { fill_solid( leds3, STRIP3_NUM_LEDS, CRGB(0,0,0)); }
// fade brightness all LEDs one step
for(int j=0; j<STRIP1_NUM_LEDS; j++) {
if( (!meteorRandomDecay) || (random(10)>5) ) {
leds1[j].fadeToBlackBy(meteorTrailDecay);
}
}
for(int j=0; j<STRIP2_NUM_LEDS; j++) {
if( (!meteorRandomDecay) || (random(10)>5) ) {
leds2[j].fadeToBlackBy(meteorTrailDecay);
}
}
for(int j=0; j<STRIP3_NUM_LEDS; j++) {
if( (!meteorRandomDecay) || (random(10)>5) ) {
leds3[j].fadeToBlackBy(meteorTrailDecay);
}
}
// draw meteor
for(int j = 0; j < meteorSize; j++) {
if( ( i-j <STRIP1_NUM_LEDS) && (i-j>=0) ) {
leds1[i-j] = CRGB(red, green, blue);
}
}
for(int j = 0; j < meteorSize; j++) {
if( ( i-j <STRIP2_NUM_LEDS) && (i-j>=0) ) {
leds2[i-j] = CRGB(red, green, blue);
}
}
for(int j = 0; j < meteorSize; j++) {
if( ( i-j <STRIP3_NUM_LEDS) && (i-j>=0) ) {
leds3[i-j] = CRGB(red, green, blue);
}
}
FastLED.show();
delay(SpeedDelay);
if(Strip1Position<STRIP1_NUM_LEDS+STRIP1_NUM_LEDS) {
Strip1Position++;
}
else
{
Strip1Postion = 0;
}
if(Strip2Position<STRIP2_NUM_LEDS+STRIP2_NUM_LEDS) {
Strip2Position++;
}
else
{
Strip2Position = 0;
}
if(Strip3Position<STRIP3_NUM_LEDS+STRIP3_NUM_LEDS) {
Strip3Position++;
}
else
{
Strip3Position = 0;
}
}
Thanks for your support.
Yves