bitluni / ESP32CameraI2S

176 stars 61 forks source link

Move sketch to an appropriately named subfolder #2

Closed per1234 closed 6 years ago

per1234 commented 6 years ago

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 commented 6 years ago

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