No, you cannot do it like that. You can however look at the three individual programs and think about how to write one program that does all three things.
Delta_G:
No, you cannot do it like that. You can however look at the three individual programs and think about how to write one program that does all three things.
Yes, you said that. An arduino can only have one setup function and one loop function, but if you post the code that you want to combine we may be able to help you achieve it
But you have to be very careful to avoid any blocking code in any of the loop functions. That means millis checks instead of delay and no long for or while loops waiting for something slow to happen.
Delta_G:
You could do this. Although it might not work in your particular application if any of the functions involve blocking code.
void setup1(){}
void setup2(){}
void setup3(){}
void loop1(){}
void loop2(){}
void loop3(){}
void setup(){
setup1();
setup2();
setup3();
}
void loop(){
loop1();
loop2();
loop3();
}
But you have to be very careful to avoid any blocking code in any of the loop functions. That means millis checks instead of delay and no long for or while loops waiting for something slow to happen.
///////////////////////////////////////
int j=0;
void setup1(){}
So why are you doing it again? If you are not capable of understanding how to post code yo are not capable of understanding the answer to your problem and everyone is wasting ther time here.