When I pass the data and clock pins to the library function as in the code below, I get this error:
template argument deduction/substitution failed:
wrong number of template arguments (4, should be 1)
If I define the data and clock pin variables as constants in example.h as such: #define DATA_PIN 26 #define CLOCK_PIN 25
it works fine. Obviously pin assignments should not be made in the library code.
I left out most of the variable declarations for clarity.
Is there a way to correctly pass the DATA_PIN and CLOCK_PIN parameters to the function?
Although I did find one problem, I don't see a missing (. Please let me know where it is missing.
If "DATA_PIN, CLOCK_PIN" are replaced with "25, 26" on the FastLED declaration in the .cpp file, the program compiles and runs perfectly. Attached are the updated files.
result =&FastLED.addLeds<APA102,DATA_PIN,CLOCK_PIN,COLOR_ORDER>(leds,nLED).setCorrection(TypicalLEDStrip);
I added the red one that was missing from your code.
constexpr byte Lixie::Addresses[];
What good is a zero element array?
Still haven't seen a link to the FastLED library that seems to be the crux of the problem.
Posting just some of your errors was what took so long to understand what was going on.
The compiler needs to be able to generate all the code for a templated class at compile time. Since the pin numbers to use are not known AT COMPILE TIME, it can't generate the class code.