Hi Sébastien!
error messages like “changeEffect’ was not declared in this scope”
This error quite often indicates that you have either a big chunk of code missing, or unbalanced accolades.
This can make a piece of code become invisible or in the wrong scope (missing a "}" would include this in the wrong function).
The unbalanced accolades can be easiest found by marking what the end-accolade ( } ) belongs to, something like the code below (example marked blue).
The unbalanced accolades can also be detected when formatting code, this is why I often place the opening accolade ( { ) on a new line, so that the closing accolade will be at a visually similar position (example marked red).
void loop() {
pirStatus = digitalRead(pirPin);
if(pirStatus == HIGH)
{
EEPROM.get(0,selectedEffect);
if(selectedEffect>18)
{
selectedEffect=0;
EEPROM.put(0,0);
} // if selected
switch(selectedEffect)
{
...
case 18 : {
// meteorRain - Color (red, green, blue), meteor size, trail decay, random trail decay (true/false), speed delay
meteorRain(0xff,0xff,0xff,10, 64, true, 30);
break;
} // case 18
} // switch
} // if pirStatus
else
{
strip.clear();
strip.show();
} // else if pirStatus
}
From what I can see, the void loop() code seems OK. However since not all the code is listed here, it may still contain an accolade issue.
What could also be the case, is that the code after void loop() is missing. See if the changeEffect function exists in your code:
void changeEffect() {
if (digitalRead (BUTTON) == HIGH) {
selectedEffect++;
EEPROM.put(0, selectedEffect);
asm volatile (" jmp 0");
}
}
Feel free to post the full code here (ideally as an attachment since the forum seems to screw up code segments that have a "<" in it, placing a space after all "<" symbols will fix this).