r/FastLED • u/Beneficial_Banana_59 • Sep 07 '26
Discussion Namespace
Does anybody know what is meant by the word "Namespace" in the context of this library? I'm trying to upload an example sketch to a Nano Every and the compiler is getting hung up on what seems to be an initial callout in the Arduino sketch:
FASTLED_USING_NAMESPACE
What does this do?
1
Upvotes
4
u/mindful_stone Sep 09 '26
I am by no means an expert on this stuff, but here's my 2 cents:
Depending on how old the example sketch you're working with is, there may be other adjustments you'll also need to make. If you still have issues, please share your code and the community will be happy to help!
3
u/ZachVorhies Zach Vorhies Sep 07 '26
name space is a way to organize code
Please provide your sketch so we can figure out what’s going on
1
u/Ok_Society4599 Sep 09 '26
Just reading that... I'd say it's a macro defined in a header that expands into a series of #includes and #defines that setup the correct order and configuration for the FastLED library. A common problem is you need an #include first where the macro is defined ... Like #include "FastLED.h" then your macro. You should be able to search your headers to find the declaration, and add the include before you use it.
-7
u/tubameister Sep 07 '26
fwiw, ai can one-shot the fix