If you rename a sketch to ".INO", ".Ino", or anything that is not ".ino" (all lowercase),
arduino will display "main file missing from sketch"
happens on version 1.8.15.
also.... sketch filenames can´t start with underline.
If you rename a sketch to ".INO", ".Ino", or anything that is not ".ino" (all lowercase),
arduino will display "main file missing from sketch"
happens on version 1.8.15.
also.... sketch filenames can´t start with underline.
You are correct, ANY file must use correct case, and using an underline to start a name is just silly.
as a DOS/Windows user, I never had to care about filename case.
arduino could show a less cryptic message than "main file missing from sketch", or be case insensitive in windows.
And it´s a bit rude to say that I´m silly...
I´ve been using underline in filenames since DOS 3.0 to keep important files on top when sorting by name.
I don't have 1.8.15 installed; but in both 1.8.5 and 1.8.13 I can happily save a (new) sketch starting with an underscore.
The only requirement is that the sketch name must match the directory name. So e.g. once your sketch is no longer important and you only rename the directory, the IDE will complain if you try to open the sketch.
So do I in a Windows environment though I usually use numbers.
Here is the specification for Arduino sketch names:
https://arduino.github.io/arduino-cli/latest/sketch-specification/#sketch-folders-and-files
It may not be enforced by the Arduino development software. Arduino IDE 2.x is especially lenient when it comes to file names. But I think it is safest to comply with the specification since there is no guarantee that non-compliant names will continue to be supported. This is especially important if you are sharing your sketches with others, since they might use different development software than you.
I imported a sketch with non-compliant name to Arduino Web Editor and the import was successful, but the sketch doesn't work and I can't delete it.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.