insert filename of *.ino-file into the sourcecode

Hi,
the arduino-IDE is able to run some kind of macros. I haven't learned anything yet about this feature.

I'm interested in inserting the actual (path) and filename into the sourcecode assigning an array of chars this path and filename so that the code can spit out this on booting through the serial interface.

Can this be done with such a macro? Or would I have to use Autohotkey?

best regards

Stefan

The FILE macro contains this string.

Serial.println(__FILE__);
1 Like