EXAMPLE 1

When the microphone detects a sound above the set threshold, send an SMS to all users of the police group containing the name and geographical coordinates of the device, after 5 seconds we activate a horn connected to output 3 for 5 minutes. Surveillance is only active on Sundays.


I9 AUDIO SENSOR

$D16=7 WEEKDAY = 7





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

AT#WAIT=5

out3=1,300



trigger event is an over-threshold sound detected by the microphone.

The first condition is that the current day is Sunday (7).

The first 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).

The second action contains the command that introduces a delay of 5 ".

The third action contains the command that activates output 3 for 300 seconds.