So far, I've been creating new .h elsewhere with NotePad and then adding it to my sketch folder via Sketch > Add File... which would more it to the correct place and make it visible as a tab. Is this really the best way?!
I'd like to share enum between two sketches (one is a transmitter, the other a receiver). How do I do this without duplicating the .h ? Creating a library seems overkill for a very specific enum.
Would I be better off combining both sketches and set a #define to choose whether to compile the transmitter or receiver?
So far, I've been creating new .h elsewhere with NotePad and then adding it to my sketch folder via Sketch > Add File... which would more it to the correct place and make it visible as a tab. Is this really the best way?!
It looks that way...
I'd like to share enum between two sketches (one is a transmitter, the other a receiver). How do I do this without duplicating the .h ? Creating a library seems overkill for a very specific enum.
I think that any code (including .h files) that is shared between multiple sketches IS a library. And probably should be treated as one. But this doesn't need to be complex. You can create a directory "harilib" in the appropriate "libraries" directory, and only put shared .h files in it (no .cpp, .pde, or .c required.) When you "import" the harilib library into your sketch, it will automatically add #includes for all the .h files it finds there, and you can simply delete the ones you don't want...
Would I be better off combining both sketches and set a #define to choose whether to compile the transmitter or receiver?
If you have separate sketches, it might make it easier to make it into a library at a future date...