user81449: The power supply is external. I want to clear one strip say pin 7, and meanwhile i dont want other strip say pin 6 to switch off...I use
FastLED.clear();
FastLED.show();
But it clears all the led strips connected to pin6 and pin7. What is the code to switch off only one strip?

user31105: You can use two CLEDController instances, which you can control separately, and by using the clearLedData you can clear either one or the other LED strip (depending on the CLEDController instance).
Below is the code I copied from
https://forum.arduino.cc/t/xrads-fastled-fastled-clear-question/693569/8
which contains more info:
#include <FastLED.h>

#define COLOR_ORDER GRB
#define LED_TYPE WS2812B

#define DATA_PIN 9
#define NUM_LEDS 26
CRGB leds[NUM_LEDS];

#define HEADLIGHTS 10   //headlight led pin
#define NUM_HEADLIGHTS 2
CRGB leds2[NUM_HEADLIGHTS];

CLEDController &ledController = FastLED.addLeds<LED_TYPE, DATA_PIN, COLOR_ORDER>(leds, NUM_LEDS);
CLEDController &headlightController =   FastLED.addLeds<LED_TYPE, HEADLIGHTS, COLOR_ORDER>(leds2, NUM_HEADLIGHTS);

void setup() {
  ledController.setCorrection(TypicalLEDStrip);
  headlightController.setCorrection(TypicalLEDStrip);

  ledController.clearLedData();
  headlightController.clearLedData();
  FastLED.show();
}

void loop() {
}


81449: <p>The power supply is external. I want to clear one strip say pin 7, and meanwhile i dont want other strip say pin 6 to switch off...I use
FastLED.clear();
FastLED.show();
But it clears all the led strips connected to pin6 and pin7. What is the code to switch off only one strip?</p>
 31105: <p>You can use two <code>CLEDController</code> instances, which you can control separately, and by using the <code>clearLedData</code> you can clear either one or the other LED strip (depending on the <code>CLEDController</code> instance).</p>
<p>Below is the code I copied from
<a href="https://forum.arduino.cc/t/xrads-fastled-fastled-clear-question/693569/8" rel="nofollow noreferrer">https://forum.arduino.cc/t/xrads-fastled-fastled-clear-question/693569/8</a>
which contains more info:</p>
<pre><code>#include &lt;FastLED.h&gt;

#define COLOR_ORDER GRB
#define LED_TYPE WS2812B

#define DATA_PIN 9
#define NUM_LEDS 26
CRGB leds[NUM_LEDS];

#define HEADLIGHTS 10   //headlight led pin
#define NUM_HEADLIGHTS 2
CRGB leds2[NUM_HEADLIGHTS];

CLEDController &amp;ledController = FastLED.addLeds&lt;LED_TYPE, DATA_PIN, COLOR_ORDER&gt;(leds, NUM_LEDS);
CLEDController &amp;headlightController =   FastLED.addLeds&lt;LED_TYPE, HEADLIGHTS, COLOR_ORDER&gt;(leds2, NUM_HEADLIGHTS);

void setup() {
  ledController.setCorrection(TypicalLEDStrip);
  headlightController.setCorrection(TypicalLEDStrip);

  ledController.clearLedData();
  headlightController.clearLedData();
  FastLED.show();
}

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