Adding File information to a compiled firmware is very useful and important to identify the used software version.
This Tip provides a subfunction, returning not only all file info via serial output but also returned filename in short and long text form
Define in the main sketch as follows
Once you need the data, call
versionsInfo(__FILE__, __FILENAME__);The function I use looks like this//=======================================================================// Versionsinfo//=======================================================================void versionsInfo(char* longFileName ,char* shortFileName){ Serial.print("\nArduino is running Sketch: "); Serial.println(shortFileName ); Serial.println(longFileName);while _FILE_ is created by the compilier, _FILENAME_ is the shortform of the main sketch only