Skip to content

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Nov 28, 2018

The Arduino IDE requires that a sketch be located in a folder of the same name.

When opening a file that does not meet this sketch/folder name matching requirement the Arduino IDE presents a dialog:

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

In the case of a sketch with a single source file, if you click "OK", the Arduino IDE will take the correct action, but this is an unnecessary extra step, which will cause confusion for beginners.

The problem is more serious with a sketch that has multiple source files, such as Episode 6 - LED matrix. After clicking "OK" the Arduino IDE currently moves only the file SKETCHNAME.ino to the new folder, leaving behind the other source files. This causes compilation of the sketch to fail:

realMatrix:17:21: error: ledData.h: No such file or directory

Sketch folder name mismatch causes import of the sketches to the Arduino Web Editor via the downloaded .zip file of this repository to fail:

This .Zip file does not contain a sketch, check the file and try again.

The sketches with single source file may be imported individually after unzipping the file, but this will leave behind the Fritzing and readme files. In the case of a multiple source file sketch such as Episode 6 - LED matrix, ledData.h is not imported along with realMatrix.ino, resulting in the same error as in the Arduino IDE.

The Arduino IDE requires that a sketch be located in a folder of the same name.

When opening a file that does not meet this sketch/folder name matching requirement the Arduino IDE presents a dialog:

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

In the case of a sketch with a single source file, if you click "OK", the Arduino IDE will take the correct action, but this is an unnecessary extra step, which will cause confusion for beginners.

The problem is more serious with a sketch that has multiple source files, such as Episode 6 - LED matrix. After clicking "OK" the Arduino IDE currently moves only the file SKETCHNAME.ino to the new folder, leaving behind the other source files. This causes compilation of the sketch to fail:

realMatrix:17:21: error: ledData.h: No such file or directory

Sketch folder name mismatch causes import of the sketches to the Arduino Web Editor via the downloaded .zip file of this repository fails:

This .Zip file does not contain a sketch, check the file and try again.

The sketches with single source file may be imported individually after unzipping the file, but this will leave behind the Fritzing and readme files. In the case of a multiple source file sketch such as Episode 6 - LED matrix, ledData.h is not imported along with realMatrix.ino, resulting in the same error as in the Arduino IDE.
@dcuartielles dcuartielles merged commit e2f4301 into arduino:master Nov 28, 2018
@dcuartielles
Copy link
Member

Thanks for the contribution!

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