Skip to content
This repository was archived by the owner on Oct 18, 2021. It is now read-only.

Conversation

@per1234
Copy link
Contributor

@per1234 per1234 commented May 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 "lightsensor.ino" needs to be inside a sketch folder named "lightsensor".
Create this folder, move the file, and continue?

After clicking "OK" the Arduino IDE currently moves only the file lightsensor.ino to the new folder, leaving behind the other source files. This causes compilation of the sketch to fail:

Lightmeter-master\lightmeter\lightmeter.ino:12:35: fatal error: rtc.h: No such file or directory

The alternative solution you might be thinking of is to change the sketch name to match the repository name. This would work for people who clone the repository but when GitHub's popular Clone or download > Download ZIP feature is used to download the contents of a repository the branch/release/commit name is appended to the folder name, resulting in the sketch and folder names still not matching.

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 "lightsensor.ino" needs to be inside a sketch folder named "lightsensor".
Create this folder, move the file, and continue?

After clicking "OK" the Arduino IDE currently moves only the file lightsensor.ino to the new folder, leaving behind the other source files. This causes compilation of the sketch to fail:

Lightmeter-master\lightmeter\lightmeter.ino:12:35: fatal error: rtc.h: No such file or directory

The alternative solution you might be thinking of is to change the sketch name to match the repository name. This would work for people who clone the repository but when GitHub's popular Clone or download > Download ZIP feature is used to download the contents of a repository the branch/release/commit name is appended to the folder name, resulting in the sketch and folder names still not matching.
@NuclearPhoenixx
Copy link
Owner

NuclearPhoenixx commented May 28, 2018

Thanks, that's indeed a real problem. Didn't think of that before, because I push directly from inside my arduino sketch folder. Thanks! 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants