I obviously just uncomment the correct line and away I go. Buuuuuut I want to work on multiple arduino boards, and they don't all have SERIAL1 ports. So rather than edit my include file over and over, is there a way to make that declaration in the INO file instead?
I tried just commenting all 4 lines out and adding the correct definition to the INO file, but it hasn't worked. Compiler throws tons of errors. I assume this is a limitation of the IDE as opposed to the actual include file itself. Is there a way to do what I'm trying to do?
get in contact with the author of the library and ask for a change request.
Explain, that you would like to hand over the serial interface to the library in your user sketch.
No, it is not a "limitation of IDE", it defined by language rules. To be used correctly, the #DEFINE setting should be part of the DMX library. The conceptinetics.h file is included to the library source, so the #DEFINE will work. The .ino file is not included to the library code so the #DEFINEs in it does not affect the compilation process.
Ok thank you everyone. I will go with the ifdef option for now I guess.
That will work for this particular bit of project and save me the flip flop editing.
I was under the impression that the .h files were included into the ino file and then the code was compiled. So I thought I should be able to move the definition. Is the include file compiled seperately? If so, I don't understand how I can end up with variable naming conflicts (other projects, not this one)