Skip to content

Conversation

@per1234
Copy link
Contributor

@per1234 per1234 commented May 8, 2019

The Arduino IDE requires the sketch folder name to match the filename of the primary sketch file. This change causes the example sketch to be accessible via the Arduino IDE's File > Examples > LIBRARYNAME menu after the library is installed.

Reference:
https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification#library-examples

The Arduino IDE requires the sketch folder name to match the filename of the primary sketch file. This change causes the example sketch to be accessible via the Arduino IDE's File > Examples > LIBRARYNAME menu after the library is installed.

Reference:
https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification#library-examples
@dadul96
Copy link
Owner

dadul96 commented May 12, 2019

Thank you for making me aware of that!
I am going to change that immediately.

However, I can't exactly find these instructions in the reference. Maybe this could be pointed out more clear, so that everybody can easily understand that.

@dadul96 dadul96 merged commit c4c2648 into dadul96:master May 12, 2019
@per1234
Copy link
Contributor Author

per1234 commented May 13, 2019

I can't exactly find these instructions in the reference. Maybe this could be pointed out more clear, so that everybody can easily understand that.

You're right that the requirement for the sketch folder to match the filename of the primary .ino file is not documented in the Arduino library specification. The specification only says that the example sketches show under the File > Examples menu of the Arduino IDE, so I added the link to back up that part of my statement.

Although I agree completely that the folder name requirement needs to be officially documented, I don't think the Arduino library specification is the appropriate place for it. The reason is that this requirement applies to all Arduino sketches, not just library examples. What we need is a sketch specification. Unfortunately Arduino does not currently have such a document.

@per1234 per1234 deleted the example-folder branch May 13, 2019 00:50
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