Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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.

Latest threads

New Articles From Microcontroller Tips

Back
Top