Declaring global variables in different tab

If you create an Arduino project with the principal .INO file and a few other .INO files in the same folder the Arduino IDE will load the principal file first and then load the others in alphabetical order. A global variable will be visible in all files loaded after the file in which it is declared but not in files loaded before. So the best place for global variables is in the principal file.

Source: Declaring global variables in different tab

Declaring global variables in different tab was last modified: December 6th, 2018 by Jovan Stosic

Leave a Reply