So I am writing a program with multiple function calls, so I started using tabs to clean it up. I just wrote a new tab where I will be doing temperature sensing. My question is when say I call the temperature sensor function at analog input 1, can I have a void setup in the tab where I set A1 as an input, then run the function? If I run a lot of temperature sensors, it could save me a couple lines of code.
Do you mean, you wanna have a
void setup() {
// some code here
}
in every file (sorry, you call it tab) of your sketch?
No, this is not possible. You can have several setup functions named differently (p.e. setup1(), setup2(), etc.) and have a setup in the main file (tab), that looks like this:
void setup() {
setup1();
setup2();
// ...
}