Move sketch to an appropriately named subfolder #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The Arduino IDE requires that the folder name match the primary sketch filename. When opening a sketch that does not meet this requirement a dialog is displayed:
Currently when you select "OK" only the .ino file is moved to the new folder. All the other sketch files are left in their original location. Thus when you attempt to compile the sketch you get the error:
Moving the sketch to a subfolder is preferable to renaming the sketch to match the repository name because when you download (rather than clone) from GitHub the branch/commit/tag is appended to the repository name, causing it to still not match the sketch name.
The reason I put the schematic file in the
data
subfolder of the sketch folder is because the Arduino IDE gives that folder the special treatment of being brought along when a sketch is saved to a different name, which would not happen if the .png was in the sketch root folder. This will ensure that the schematic stays with the sketch.