I've a little problem, I'm trying to create a library with processor variables for tune it.
So in .ino I declared my preprocessor var, but preprocessor variables appear not defined in my library. (Notice that I've create a folder test/test.h in libraries directory of Arduino IDE)
Some code to reproduce the problem :
test.ino :
#define TEST
#include "test.h"
void setup() {}
void loop() {}
test.h (edited, reverse error message, this is solution)
#if defined(TEST)
#error "DEFINED"
#else
#error "NOT DEFINED"
#endif
If I compile it, I fall on #error "NOT DEFINED".
Somebody with an idea ?
Have a good day
#define TEST (1)?