detect 0017 from 0016 (or earlier)

How can I test for different IDEs at compile time.

In my sketch I’d like to be able to do an #ifdef around some code to compile one way for arduino-0016 and another for arduino-0017 ?

Is there a #define that I can test against?


PS. Wiring.h defines ARDUINO as 16 in both 0016 and 0017

I think that was an oversight. I suggest you report that as a bug in the Software/Bugs & suggestions threads.
The work around is to change the 16 to 17 in your copy of wiring.h