I have not yet been able to test the code, but maybe we should walk through the error messages, so you'd be able to debug.
So loaded your code into my Arduino IDE and did a test compile (menu: Sketch -> Verify/Compile) which resulted in these error messages:
Arduino: 1.8.7 (Mac OS X), Board: "Arduino/Genuino Uno"
In file included from /Users/hans/Documents/Arduino/sketch_jul18a/sketch_jul18a.ino:1:0:
/Users/hans/Documents/Arduino/libraries/FastLED/FastLED.h:14:21: note: #pragma message: FastLED version 3.002.001
# pragma message "FastLED version 3.002.001"
^
/Users/hans/Documents/Arduino/sketch_jul18a/sketch_jul18a.ino: In function 'void newRGBLoop()':
sketch_jul18a:12:19: error: 'setAll' was not declared in this scope
setAll(0xff,20,0); // set all to amber
^
sketch_jul18a:16:59: error: expected ')' before ';' token
setPixel(i, 0xff, 255 - (i*(235/4)), 255 - (i*(255/4); // 235 = 255 - 20, 20 for amber (from your code)
^
sketch_jul18a:16:59: error: expected ')' before ';' token
sketch_jul18a:17:72: error: 'setPixel' was not declared in this scope
setPixel(NUM_LEDS-1- i, 0xff, 255 - (i*(235/4)), 255 - (i*(255/4)));
^
sketch_jul18a:19:13: error: 'showStrip' was not declared in this scope
showStrip();
^
/Users/hans/Documents/Arduino/sketch_jul18a/sketch_jul18a.ino: At global scope:
sketch_jul18a:26:7: error: expected declaration before '}' token
}
^
exit status 1
'setAll' was not declared in this scope
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
So let's go through these messages;
1) " # pragma message "FastLED version 3.002.001" "
This is just a message that we can ignore in this case.
2) "setAll(0xff,20,0); // set all to amber" (sketch_jul18a:12:19: error: 'setAll' was not declared in this scope)
You'll see that in the file "sketch_jul18a", line 12, at the 19th character of that line, setAll appears not defined.
Let's go through some more message to see if there is a connection with the other messages. After all "setAll()" is defined at the end of the sketch, so other typos/errors may cause this.
3) "setPixel(i, 0xff, 255 - (i*(235/4)), 255 - (i*(255/4);" (sketch_jul18a:16:59: error: expected ')' before ';' token)
As before, line 16 character 59; we're missing a ')' before the ';' character.
Easy fix, change line 16 to:
setPixel(i, 0xff, 255 - (i*(235/4)), 255 - (i*(255/4)));
We are actually missing 2 ')' ... you can see this in the IDE. When setting your text cursor at a ')', the editor will highlight the '(' that goes with it.
Keep this one in mind; forgetting a ')' or a ';' or '}' are quite common.
So, recompile/verify, and we will see; this did not fix the other problems, so let's continue.
4) "showStrip();" (expected declaration before '}' token)
This may be the culprit ...
If we look at the code, you'll see there is a boo-boo there:
void setup()
{ delay(2000);
FastLED.addLeds<WS2811, PIN, GRB>(leds, NUM_LEDS).setCorrection( TypicalLEDStrip );
}
void newRGBLoop() {
setAll(0xff,20,0); // set all to amber
// set first 4 and last 4 to a fade white to amber (you may have to tweak the calculation)
for(int i=0; i<4; i++) {
setPixel(i, 0xff, 255 - (i*(235/4)), 255 - (i*(255/4))); // 235 = 255 - 20, 20 for amber (from your code)
setPixel(NUM_LEDS-1- i, 0xff, 255 - (i*(235/4)), 255 - (i*(255/4)));
}
showStrip();
delay(25000); // wait for 25 seconds
setAll(0,0,0); // set all LEDs to black/off
}
}
showStrip();
delay(25); //time of strip to stay on
}
// Fade OUT
for(int k = 255; k >= 0; k--) {
switch(j) {
case 0: setAll(0xff,25,0); break;
}
showStrip();
delay(25); //time for strip to stay on
}
}
}
The bold section has no place to below to ... I assume you pasted some of the code in, but forgot to adapt or delete some of the old code.
Unfortunately, this doesn't resolve things yet.
5) undefined reference to `loop'
After removing the bold code in the step 4, we get a new error message, and this one is straight forward: the linker (ld) cannot find the "loop()" function in your code!
/var/folders/xb/gtxmm97s5ml1fmn0j78cck5h0000gn/T//cc0oU02c.ltrans0.ltrans.o: In function `main':
/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/main.cpp:46: undefined reference to `loop'
collect2: error: ld returned 1 exit status
exit status 1
Renaming "newRGBLoop" to "loop" fixes the issue.
Now, since I cannot test this, I'm not sure if this is what you were looking for.
However; lesson learned; be careful when pasting code, to not make a mess of things.
And with this walk through you may become more comfortable trying to read and debug error messages.