Apparently you don't want me to sleep tight, right ? ;D
if I "search" in the filename for characters that don't exist like :
ino = (ino.substring((ino.indexOf("Z")), (ino.lastIndexOf("Z")) + 1));
then the serial monitor shows the full path. I could check the lenght of the new ino string, and if it's longer than e.g. 40 (a filename with more than 40 characters is not a filename, but a book ... ) then I could generate a fault message.
But on the other hand, the original ino string comes from the Arduino IDE ... should I assume that the IDE makes mistakes ?
If there's NO "." and/or no "" in the filename, I think that our IDE will NOT save it ...
But I could change the code in
ino = (ino.substring((ino.indexOf(".ino")), (ino.lastIndexOf("//")) + 1));
then at least I've checked if the IDE saved the sketch with extention ".ino"
For the moment, I have enough space for prog and variables in my sketch, but this is just the start of the second part of my project. I'm using a Mega now, but if possible I want to have it running on an UNO or even a NANO ... so I'm very parsimonious with space ...
With this project I want to monitor my SOLAR panels. I have an "outside" unit (NANO : already working) that will get data from a "panel controller" and transmit these data (and a few others) via wireless or RS485 (not sure yet, have to check and test) to my inside unit. The inside unit will interpret this data and calculates and draws graphs etc.etc. On a MEGA, I'll have more than enough memory, but an UNO/NANO consumes less power...