Skip to content

Move sketch to an appropriately named subfolder #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 14, 2017
Merged

Move sketch to an appropriately named subfolder #2

merged 1 commit into from
Dec 14, 2017

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Dec 13, 2017

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:

The file "ESP32_I2S_Camera.ino" needs to be inside a sketch folder named "ESP32_I2S_Camera".
Create this folder, move the file, and continue?

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:

ESP32_I2S_Camera\ESP32_I2S_Camera.ino:1:20: fatal error: OV7670.h: No such file or directory

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.

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:

The file "ESP32_I2S_Camera.ino" needs to be inside a sketch folder named "ESP32_I2S_Camera".
Create this folder, move the file, and continue?

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:

ESP32_I2S_Camera\ESP32_I2S_Camera.ino:1:20: fatal error: OV7670.h: No such file or directory

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.
@bitluni bitluni merged commit 372537b into bitluni:master Dec 14, 2017
@bitluni
Copy link
Owner

bitluni commented Dec 14, 2017

...good point... thanks. I also often just download the source...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants