Go Down

Topic: Is it possible to split code into several .ino files? (Read 1 time) previous topic - next topic


Dear Arduino experts,

When the main .ino file gets big, things get rather messy. Is it possible to split into multiple .ino files? How do I include another .ino file?

Is it something like this?

#include "subfile.ino"

I cannot find documentation whether this can be done. Can someone point me to some link, if it exists?

Thank you.


Is it possible to split into multiple .ino files?


How do I include another .ino file?

You don't need to. The IDE will merge all the .ino files into one .cpp file to pass to the compiler. You don't have to "help".

All you need to do is use the new tab icon to create a new tab, and name the file for that tab using a .ino extension.
The art of getting good answers lies in asking good questions.


hi could you give an example in order to understand the usage ? coulbe very usufel for shirink logical the project :-) thanks


Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131