<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									Help on Code for Multi-Array (2 strips with different LED count) - Arduino				            </title>
            <link>https://www.tweaking4all.com/forum/arduino/help-on-code-for-multi-array-2-strips-with-different-led-count/</link>
            <description>Tweaking4All.com Discussion Board</description>
            <language>en-US</language>
            <lastBuildDate>Tue, 09 Jun 2026 02:55:15 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>RE: Help on Code for Multi-Array (2 strips with different LED count)</title>
                        <link>https://www.tweaking4all.com/forum/arduino/help-on-code-for-multi-array-2-strips-with-different-led-count/#post-3313</link>
                        <pubDate>Fri, 02 Apr 2021 14:48:19 +0000</pubDate>
                        <description><![CDATA[Excellent! 😊]]></description>
                        <content:encoded><![CDATA[<p>Excellent! 😊 </p>]]></content:encoded>
						                            <category domain="https://www.tweaking4all.com/forum/arduino/">Arduino</category>                        <dc:creator>Hans</dc:creator>
                        <guid isPermaLink="true">https://www.tweaking4all.com/forum/arduino/help-on-code-for-multi-array-2-strips-with-different-led-count/#post-3313</guid>
                    </item>
				                    <item>
                        <title>RE: Help on Code for Multi-Array (2 strips with different LED count)</title>
                        <link>https://www.tweaking4all.com/forum/arduino/help-on-code-for-multi-array-2-strips-with-different-led-count/#post-3312</link>
                        <pubDate>Fri, 02 Apr 2021 14:47:12 +0000</pubDate>
                        <description><![CDATA[@hans
Wow, it works! Thank you so much Hans! Now I&#039;m going to figure out how to replace the effects with other existing ones out there. Specially the Cyan or Rainbow March. 😀]]></description>
                        <content:encoded><![CDATA[<p>@hans</p>
<p>Wow, it works! Thank you so much Hans! Now I'm going to figure out how to replace the effects with other existing ones out there. Specially the Cyan or Rainbow March. 😀 </p>]]></content:encoded>
						                            <category domain="https://www.tweaking4all.com/forum/arduino/">Arduino</category>                        <dc:creator>zef</dc:creator>
                        <guid isPermaLink="true">https://www.tweaking4all.com/forum/arduino/help-on-code-for-multi-array-2-strips-with-different-led-count/#post-3312</guid>
                    </item>
				                    <item>
                        <title>RE: Help on Code for Multi-Array (2 strips with different LED count)</title>
                        <link>https://www.tweaking4all.com/forum/arduino/help-on-code-for-multi-array-2-strips-with-different-led-count/#post-3311</link>
                        <pubDate>Fri, 02 Apr 2021 14:28:00 +0000</pubDate>
                        <description><![CDATA[Hi Zef!
Welcome to the forum!
When looking at your code, I see a few things that may not be entirely correct (partially my fault maybe).I&#039;ve corrected a few things, and hopefully this help...]]></description>
                        <content:encoded><![CDATA[<p>Hi Zef!</p>
<p>Welcome to the forum!</p>
<p>When looking at your code, I see a few things that may not be entirely correct (partially my fault maybe).<br />I've corrected a few things, and hopefully this helps you get to the next step 😊 </p>
<pre contenteditable="false">// MultipleStripsInOneArray - see  https://github.com/FastLED/FastLED/wiki/Multiple-Controller-Examples  for more info on
// using multiple controllers.  In this example, we're going to set up four NEOPIXEL strips on three
// different pins, each strip will be referring to a different part of the single led array

#define FASTLED_INTERNAL // just used to mute the Pragma messages when compiling
#include &lt;FastLED.h&gt;

#define NUM_LEDS_STRIP_A 121
#define NUM_LEDS_STRIP_B 30

#define PIN_STRIPA 6
#define PIN_STRIPB 5

#define NUM_LEDS 151

CRGB leds1;
CRGB leds2;

int Strip1Position = 0;
int Strip2Position = 0;

void setup() {
  FastLED.addLeds&lt;WS2812B, PIN_STRIPA, GRB&gt;(leds1, NUM_LEDS_STRIP_A).setCorrection( TypicalLEDStrip );
  FastLED.addLeds&lt;WS2812B, PIN_STRIPB, GRB&gt;(leds2, NUM_LEDS_STRIP_B).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, NUM_LEDS_STRIP_A, CRGB(0, 0, 0));
  }
  if (Strip2Position == 0) {
    fill_solid(leds2, NUM_LEDS_STRIP_B, CRGB(0, 0, 0));
  }

  // fade brightness all LEDs one step
  for (int j = 0; j &lt; NUM_LEDS_STRIP_A; j++) {
    if ((!meteorRandomDecay) || (random(10) &gt; 5)) {
      leds1.fadeToBlackBy(meteorTrailDecay);
    }
  }

  for (int j = 0; j &lt; NUM_LEDS_STRIP_B; j++) {
    if ((!meteorRandomDecay) || (random(10) &gt; 5)) {
      leds2.fadeToBlackBy(meteorTrailDecay);
    }
  }

  // draw meteor
  for (int j = 0; j &lt; meteorSize; j++) {
    if ((Strip1Position - j &lt; NUM_LEDS_STRIP_A) &amp;&amp; (Strip1Position - j &gt;= 0)) {
      leds1 = CRGB(red, green, blue);
    }
  }

  for (int j = 0; j &lt; meteorSize; j++) {
    if ((Strip2Position - j &lt; NUM_LEDS_STRIP_B) &amp;&amp; (Strip2Position - j &gt;= 0)) {
      leds2 = CRGB(red, green, blue);
    }
  }

  FastLED.show();
  delay(SpeedDelay);

  if (Strip1Position &lt; NUM_LEDS_STRIP_A + NUM_LEDS_STRIP_A) {
    Strip1Position++;
  } else {
    Strip1Position = 0;
  }

  if (Strip2Position &lt; NUM_LEDS_STRIP_B + NUM_LEDS_STRIP_B) {
    Strip2Position++;
  } else {
    Strip2Position = 0;
  }

}
</pre>]]></content:encoded>
						                            <category domain="https://www.tweaking4all.com/forum/arduino/">Arduino</category>                        <dc:creator>Hans</dc:creator>
                        <guid isPermaLink="true">https://www.tweaking4all.com/forum/arduino/help-on-code-for-multi-array-2-strips-with-different-led-count/#post-3311</guid>
                    </item>
				                    <item>
                        <title>Help on Code for Multi-Array (2 strips with different LED count)</title>
                        <link>https://www.tweaking4all.com/forum/arduino/help-on-code-for-multi-array-2-strips-with-different-led-count/#post-3310</link>
                        <pubDate>Fri, 02 Apr 2021 14:10:55 +0000</pubDate>
                        <description><![CDATA[Hi everyone, this is my first post although I&#039;ve already received a lot of help through article comments which I am grateful for.
I don&#039;t have any experience in ws2812b projects using Uno, ...]]></description>
                        <content:encoded><![CDATA[<p>Hi everyone, this is my first post although I've already received a lot of help through article comments which I am grateful for.</p>
<p><em>I don't have any experience in ws2812b projects using Uno</em>, especially coding. I am doing my best to read/watch stuff about it online. So far, Tweaking4all has been my guide to start my project. From the materials needed up to making it work, this has helped me a lot. Now I'm on the part where I want to add a code for it. I tried to compile 2 existing codes for my project, The first part of the code was from arduino forums and the second one was from Hans (Meteor Rain). Although I really want a combination of Cyclon and Ranbow March, I think it may be advanced for me so I am doing a single effect for the 2 strips for now.</p>
<p>What I am using:</p>
<p><strong><span style="color: #0000ff">Arduino Uno</span></strong> &amp; <strong><span style="color: #33cccc">WS2812b</span></strong> (2 Strips / 30leds and 121leds)</p>
<p>I am getting this error message: <span style="color: #ff6600"><em>expected unqualified-id before numeric constant</em></span>  from the 2nd line:</p>
<p><span style="color: #99cc00">#define</span> NUM_LEDS_PER_STRIP_A 121<br /><em><span style="color: #99cc00">#define</span> NUM_LEDS_PER_STRIP_B 30</em></p>
<p>I know more errors will come after this one. I just want to know what caused this issue to happen.</p>
<p> </p>
<p>The entirety of the code that I was trying to compile:</p>
<pre contenteditable="false">// MultipleStripsInOneArray - see https://github.com/FastLED/FastLED/wiki/Multiple-Controller-Examples for more info on
// using multiple controllers.  In this example, we're going to set up four NEOPIXEL strips on three
// different pins, each strip will be referring to a different part of the single led array

#include &lt;FastLED.h&gt;
 
 #define NUM_LEDS_PER_STRIP_A 121
 #define NUM_LEDS_PER_STRIP_B 30

#define NUM_LEDS 151

CRGB leds;

void setup() {
  FastLED.addLeds&lt;WS2812B, 6&gt;(leds, 121, NUM_LEDS_PER_STRIP_A);

  FastLED.addLeds&lt;WS2812B, 5&gt;(leds, 30, NUM_LEDS_PER_STRIP_B);

int NUM_LEDS_PER_STRIP_A = 0;
int NUM_LEDS_PER_STRIP_B = 0;
}

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, NUM_LEDS_PER_STRIP_A, CRGB(0,0,0)); }
  if (Strip2Position==0) { fill_solid( leds2, NUM_LEDS_PER_STRIP_B, CRGB(0,0,0)); }
 
  
  // fade brightness all LEDs one step
  for(int j=0; j&lt;NUM_LEDS_PER_STRIP_A; j++) {
    if( (!meteorRandomDecay) || (random(10)&gt;5) ) {
      leds1.fadeToBlackBy(meteorTrailDecay); 
    }
  }
  
  for(int j=0; j&lt;NUM_LEDS_PER_STRIP_B; j++) {
    if( (!meteorRandomDecay) || (random(10)&gt;5) ) {
      leds2.fadeToBlackBy(meteorTrailDecay); 
    }
  }
  
   
  // draw meteor
  for(int j = 0; j &lt; meteorSize; j++) {
    if( ( i-j &lt;NUM_LEDS_PER_STRIP_A) &amp;&amp; (i-j&gt;=0) ) {
      leds1 = CRGB(red, green, blue);
    }
  }
   
  for(int j = 0; j &lt; meteorSize; j++) {
    if( ( i-j &lt;NUM_LEDS_PER_STRIP_B) &amp;&amp; (i-j&gt;=0) ) {
      leds2 = CRGB(red, green, blue);
    }
  }

  
  FastLED.show();
  delay(SpeedDelay);
  
  if(NUM_LEDS_PER_STRIP_APosition&lt;NUM_LEDS_PER_STRIP_A+NUM_LEDS_PER_STRIP_A) {
    Strip1Position++; 
  }
  else
  {
    Strip1Postion = 0;
  }
  
  if(NUM_LEDS_PER_STRIP_BPosition&lt;NUM_LEDS_PER_STRIP_B+NUM_LEDS_PER_STRIP_B) {
    Strip2Position++; 
  }
  else
  {
    Strip2Position = 0;
  }
  
 
}
}

}</pre>]]></content:encoded>
						                            <category domain="https://www.tweaking4all.com/forum/arduino/">Arduino</category>                        <dc:creator>zef</dc:creator>
                        <guid isPermaLink="true">https://www.tweaking4all.com/forum/arduino/help-on-code-for-multi-array-2-strips-with-different-led-count/#post-3310</guid>
                    </item>
							        </channel>
        </rss>
		