Arduino IDE, tabs and #defines.

Status
Not open for further replies.

dr pepper

Well-Known Member
Most Helpful Member
OK so I'm playing with arduino's.

I'm trying to write a program that uses multiple tabs, I'm sure this is a noob issue however how do I make a variable valid in all tabs, if I define a variable in one tab and try and use it in another I get the same old error message.
Should I put all the variable definitions in a .h file?

Edit: I think I sussed it, I need to define the variable as a global in the tab where its function resides, and all other tabs I need to declare it as a unitialized variable using 'external' beforehand, I love arduino ide, and google.
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…