Hi all ! i'm working on a big sketch for an Arduino Mega 2560. As the sketch is quite large, I want to split it in several files. So, I made a new sketch called "Test" (very original !). Here is the code :
There is a right arrow button on the same line as the sketch name. This allows separate 'tabbed' files to be created that will be concatenated to the main sketch by the arduino precompiler. I believe the tabbed files have to be named namewhatever.c or namewhaterver.cpp. These files will be saved separately in the same folder as the main sketch.
Thanks for your response. But that's exactly whay I've done ! To create my new tab, I clicked on the right arrox, next "New tab" and I typed "functions.c" as filename.
From my tests, both should be sketches. Then add the pde file.
Enter the second code as sketch named "functions" rather than C code. It will create a functions.pde file in a "functions" folder. That is the file to add.
EDIT: I just ran another test. If you just rename your functions.c file to functions.pde, it should work also.