Thanks again AWOL for the tip.
I threw together this little function to display what I need. Maybe someone else will find it helpful as well.
// displays at startup the Sketch running in the Arduino
void display_Running_Sketch (void){
String the_path = __FILE__;
int slash_loc = the_path.lastIndexOf('/');
String the_cpp_name = the_path.substring(slash_loc+1);
int dot_loc = the_cpp_name.lastIndexOf('.');
String the_sketchname = the_cpp_name.substring(0, dot_loc);
Serial.print("\nArduino is running Sketch: ");
Serial.println(the_sketchname);
Serial.print("Compiled on: ");
Serial.print(__DATE__);
Serial.print(" at ");
Serial.print(__TIME__);
Serial.print("\n");
}
I call it like this in setup()
void setup() {
Serial.begin(9600);
display_Running_Sketch();
}
My output in the Serial Monitor looks like this:
Arduino is running Sketch: MyTestSketch_ver_2
Compiled on: Aug 15 2012 at 09:36:27
(It could, of course, be used without the function, just copy/paste directly into setup() )