Go Down

Topic: Sketch name as PreProcessor value? (Read 1 time) previous topic - next topic


tape a sticker to the chip ....easy
I'm old and started too late with microcontrollers


Good idea about the sticker  :)

Yes, revision control is a lot of it. Also, as a hobbyist, I currently have only one Arduino. So, if I "borrow" it from one project, tinker, then want to put it back the way it was, that is why it would be nice to have it echo back the sketch name before I re-upload an alternate sketch. But, yeah, I'd already be connected and in the IDE.

So - given the numerous ways this could be accomplished, both efficiently and inefficiently, I return to my original idea of there being an "easy" way to include the sketch name.

It would be great if the functionality were something like a reserved word that the Arduino IDE uses, so the IDE handles any filename or path manipulation, and then simply injects the sketch name into the sketch as if it were hand typed by the developer. That way, the IDE does the work, and the sketch is only bloated by 30 or so bytes to contain the sketch name. I don't think there is a dynamic (programatic) way to do the same task in less space than that. (And yes, the concept would possibly break in alternate IDE like XCode or Eclipse)

Thanks to everyone for your input. This is great stuff.

Go Up