title: How can I combine these two for loop statements?
body: <p>Hi I'm using an Arduino to have a column of 4 leds streak across from left to right then back across on a 4x16 led panel.
  Currently I am using two for loop statements to make this happen but I'm wondering if there is way to combine the two loops or something so that left to right to left is all encompassed in one statement.
  Thanks.</p>
  
  <pre><code>int row1 = 0;
  int row2 = 0;
  int row3 = 0;
  int row4 = 0;
  int row1r = 0;
  int row2r = 0;
  int row3r = 0;
  int row4r = 0;
  
  void setup() {
    FastLED.addLeds&lt;LED_TYPE, DATA_PIN, COLOR_ORDER&gt;(leds, NUM_LEDS);
    Serial.begin(9600);
    while (! Serial);
  }
  
  void loop() {
    // Left to Right
    for (row1 = 0, row2 = 31, row3 = 32, row4 = 63; row1 &lt;= 15 &amp;&amp; row2 &gt;= 16 &amp;&amp; row3 &lt;= 47 &amp;&amp; row4 &gt;= 48; row1++, row2--, row3++, row4--) {
      leds[row1] = CRGB::Blue;
      leds[row2] = CRGB::Blue;
      leds[row3] = CRGB::Blue;
      leds[row4] = CRGB::Blue;
      FastLED.show();
      delay(30);
      leds[row1] = CRGB::Black;
      leds[row2] = CRGB::Black;
      leds[row3] = CRGB::Black;
      leds[row4] = CRGB::Black;
    }
    // Right to Left
    for (row1r = 15, row2r = 16, row3r = 47, row4r = 48; row1r &gt;= 0 &amp;&amp; row2r &lt;= 31 &amp;&amp; row3r &gt;= 32 &amp;&amp; row4r &lt;= 63; row1r--, row2r++, row3r--, row4r++) {
      leds[row1r] = CRGB::Blue;
      leds[row2r] = CRGB::Blue;
      leds[row3r] = CRGB::Blue;
      leds[row4r] = CRGB::Blue;
      FastLED.show();
      delay(30);
      leds[row1r] = CRGB::Black;
      leds[row2r] = CRGB::Black;
      leds[row3r] = CRGB::Black;
      leds[row4r] = CRGB::Black;
    }
  }
  </code></pre>