Hello Community, I am exploring the mysteries of using classes and built my own

Hello Community,

I am exploring the mysteries of using classes and built my own class to organize the animations of a LED Strip.

Now I want to integrate the color palettes as a member of my class. The palettes should be inserted as an array, so I can selet them later by an index

Please find the example code here: https://pastebin.com/UrbUNaeH

The palettes are defined in a palettes.h file, but now the compiler complains about multiple defined objects (palettes). I think it is because the _palettes[] array in myClass defines the palettes a second time.

MAybe someone can give me a hint how I can keep the palette definitions in the palette.h file and still have them as member of my class?

I am using a Teensy 3.2 with Visual Studio 2017, Visual Micro 1801.27 and Arduino 1.8.1

Regards

Matze

Turns out it has something to do with the #include of the Palettes.h. In my class.h and class.cpp I commented everything out regarding the Palettes. The error is still there when the palettes.h is included and disappears when its not includes or includes in the .ino File (Fastled.h is included as well)

Can you post the full compiler message? What does your .ino file look like (or) how do you use myClass.h?