Mutliple files in a sketch - help please

I have been through the getting started bits and it seems to stop at anything bigger that a single small sketch.

Is there any more advanced help or example stuff on how I can move functions/classes out to other files in the sketch and hook everything up?


There is an icon on the IDE to create a new tab. You can create another sketch file, or a header file (.h) or a source file (.cpp (or, if you are a masochist, a c file)). Move your functions to the cpp file, and create a prototype in the header file. Include the header file in the sketch.


I seem to have got it working with a bit of massaging. Seems quite clever as well :slight_smile:

The documentation should be a bit better on this though. The only mention of this stuff seems to be the add file button.