I decided to finally migrate over my roof LEDs from a bulky Arduino Uno

I decided to finally migrate over my roof LEDs from a bulky Arduino Uno to a Particle Photon. After a bit of a wiring ordeal, I’m now into the code. For the most part, my sketches have worked, but I’m struggling with a sketch that uses palettes. I’m getting errors during the compile phase and I think I’ve boiled it down to the one function:

void palettetest( CRGB* ledarray, uint16_t numleds, const CRGBPalette16& gCurrentPalette)
{
if (currentMillis - previousMillis >= 30) {
previousMillis = currentMillis;
static uint8_t startindex = 0;
startindex–;
fill_palette( ledarray, numleds, startindex, (256 / NUM_LEDS) + 1, gCurrentPalette, 255, LINEARBLEND);
FastLED.show();
}
}

There’s a lot more to the code and I can post it up somewhere if need be, but if I remove this block out entirely, I get no errors. I’ve tried brute forcing the ledarray and numleds variables so that I only need to supply the name of the palette when running the function but even in that case, I’m hitting a wall that seems to keep coming back to:

“‘CRGBPalette16’ does not name a type”

I also get:

“ISO C++ forbids declaration of ‘gCurrentPalette’ with no type [-fpermissive]”

any help is, of course, appreciated.

sounds like gCurrentPalette was not properly declared/defined.

see lines 53-54 of Mark’s ColorWavesWithPalettes sketch (https://gist.github.com/kriegsman/8281905786e8b2632aeb)
https://gist.github.com/kriegsman/8281905786e8b2632aeb

Copied and pasted, but got the same error during compilation. Here’s the code in its entirety. The loop was left empty to help with troubleshooting.

https://pastebin.com/MrFWAbQ2

I never had a Particle Photon, but iirc, it is not officially supported by FastLED, but some inofficial port of some older release.
Maybe thats the reason that you miss some newer functions.

I’d recommend an ESP8266 anyway. Very cheap, good support, plenty of space (flash and RAM). I use it for any new project and just ignore the Wifi. :wink:

@Thomas_Runge , that’s cool and everything, but the point of my project is to be able to change the display on my roof without having disconnect the controller, go inside, upload a new sketch, test it, disconnect it and go inside to try again, ad nauseum. Having the wifi is a great boon plus it allows for future fun, like controlling colors and patterns with a phone.

I know that FastLED isn’t officially supported on Photon, but guys like @Jason_Coon have had a good amount of success and I’m trying to get a small piece of that.

Well, I read that ESP8266 can do OTA updates too.

https://esp8266.github.io/Arduino/versions/2.0.0/doc/ota_updates/ota_updates.html