Gsm Sim900a

.hello everyone.
. i have a sample code of how to interface sim900a with arduino and it works properly. but how can i set a code that when a certain condition is met the gsm will send sms automatically. heres the sample code

sim900amini.ino (2.19 KB)

This is the best I can do with the limited info in your post.

Add this to your loop function:

if (Condition is met){
  SendMessage();
}

Remove "Condition is met" and place your condition there, for example, "VariableX == 24"