EXAMPLE 1

Send an SMS message when they change latitude or longitude, saving the current value in memory variables every minute and comparing it with the current value.

We can also give memory variables a meaningful name:

V10=lat

MEMORY VARIABLE NAME 1 = lat

V20=lon

MEMORY VARIABLE NAME 2 = lon


SCH**** SCHEDULED AT **:**

$G01!$V11 LATITUDE ! MEMORY VARIABLE 1





lat=$G01

AT+SMS=police,"$D01 location: $G01 $G02"




TRIGGER EVENT occurs every minute (****).

The first condition to check is that the current latitude value is different from the content of variable 1.

The first action stores the current latitude in variable memory expression 1, equivalent to V21=$G01 or var1=$G01.

The second action contains the command that sends an SMS message to all users belonging to the police group reporting the device name ($D01) followed by the text "location" and the geographic coordinates ($G01 latitude and $G02 longitude).


SCH**** SCHEDULED AT **:**

$G02!$V21 LONGITUDE ! MEMORY VARIABLE 2





lon=$G02

AT+SMS=police,"$D01 location: $G01 $G02"




TRIGGER EVENT occurs every minute (****).

The first condition to check is that the current longitude value is different from the content of variable 2.

The first action stores the current longitude in variable memory expression 2, equivalent to V22=$G02 or var2=$G02.

The second action contains the command that sends an SMS message to all users belonging to the police group reporting the device name ($D01) followed by the text "location" and the geographic coordinates ($G01 latitude and $G02 longitude).