Need help calling file

Hello

I am working on a project right now concerning accelerometers that are attached on arduino UNO. I am trying to implement a step that I need help with. I have set up an algorithm that collects data from accelerometer. In that algorithm, I have also said that if the data reaches + or - 100 the data collected right before, print "working". Now, I have arduino GSM shield attached on it and I am using example send text message program (separate file from accelerometer algorithm). So, what I want to do is that when accelerometer algorithm says that "working" , I want to call the GSM text message file. How do I call another arduino IDE file into another arduino IDE file.

Thanks

Start with an empty sketch and think about the functions it must perform. Give each function a name which describes what it does: readAccelerometer(), sendMessage() and so on. Write your main loop() so it calls those functions.

Now pull the correct pieces of code out of the examples and put it into those functions.

The post "Planning and Implementing an Arduino Program" at the top of "Programming Guidance" has more detail on this method.

Rupter:
How do I call another arduino IDE file into another arduino IDE file.

You can’t call a second Arduino program. An Arduino can only work with one program at a time.

As @MorganS has said you can simulate the idea of having separate programs by putting different sections of code in their own functions. Planning and Implementing a program.

…R