I am testing, using the the excellent clyon, and got everything working great… but! I have tried to fade the second CRGB (bleds) after I use memmove8 to copy the first 14 leds from the CRBG (leds) strip. It works great, but when I try to then apply fadeToBlackBy function on the bleds, it throws no errors, just doesn’t seem to work. Any ideas?
Two different tries:
First one.
void loop() {
int dot2 = 216;
static uint8_t hue = 0;
Serial.print(“x”);
// First slide the led in one direction
for(int i = 0; i < NUM_LEDS/2; i++) {
// Set the i’th led to red
leds[i] = CHSV(hue++, 255, 255);
leds[dot2] = CHSV(hue++, 255, 255);
memmove8(&bleds[0],&leds[0], 14*sizeof(CRGB));
if (i < 14){
bleds[i].fadeToBlackBy(240);
}
// Show the leds
FastLED.show();
// now that we've shown the leds, reset the i'th led to black
// leds[i] = CRGB::Black;
fadeall();
// Wait a little bit before we loop around and do it again
//delay(10);
memmove8(&bleds[0],&leds[0], 14*sizeof(CRGB));
FastLED.delay(1);
dot2 = dot2 -1;
}
Second one.
void loop() {
int dot2 = 216;
static uint8_t hue = 0;
Serial.print(“x”);
// First slide the led in one direction
for(int i = 0; i < NUM_LEDS/2; i++) {
// Set the i’th led to red
leds[i] = CHSV(hue++, 255, 255);
leds[dot2] = CHSV(hue++, 255, 255);
memmove8(&bleds[0],&leds[0], 14*sizeof(CRGB));
fadeToBlackBy(bleds+0,14,240);
// Show the leds
FastLED.show();
// now that we've shown the leds, reset the i'th led to black
// leds[i] = CRGB::Black;
fadeall();
// Wait a little bit before we loop around and do it again
//delay(10);
memmove8(&bleds[0],&leds[0], 14*sizeof(CRGB));
FastLED.delay(1);
dot2 = dot2 -1;
}