Moving from one huge .ino file to files with classes .. and banging my head

Hi everyone

Trying to move code to classes, but I'm having troubl with doing so. First issue, is with the preprocessor, where I use som simple macros:

#define SIZE 16
.. 


std::bitset<SIZE> MyVar;
...


#if SIZE > 8
...
#endif

This used to work fine, but now the SIZE macro need to be used, both within the main .ino file, and inf the new .h and .cpp files.

How can I create that SIZE macro, so it would be available to the new classes?

Regards Søren

You put it in the .h file. The .cpp file will #include it so it also sees the definition.

Ofcourse .. thanks mate. :slight_smile:

I have multi-file project in Arduino style (no classes)