Skip to Content
This is the Beta version of our new Learning Paths approach. Please email feedback.

Sketches

The sketch for this circuit is structured as a collection of sub-sketches stored in a folder with the name of the main sketch. Each sub-sketch has the code to serve one function (using the architectural principles of Separation of Duties and Do not Repeat Yourself). The main sketch file calls these individual functions as required.

All .ino files in the sketch folder are concatenated together when compiling, starting with the file that matches the folder name followed by the others in alphabetical order. The .cpp filename extension is then added to the resulting file.

The Arduino build environment automatically creates prototypes for functions in the main tab of a sketch so there is no need to put a function declaration before it is called except in some cases.