' ***********************************************************************
' * Script name:   Input_w_dbnc_Test                                    *
' * Description:   The device sends the messages to the serial port     *
' *                whent the input 1 and 2 are in high/low              *
' *                It is not include io dbounce                         *
' *                The device will send the message when the state of   *
' *                IO is x seconds (defined with at$iodbnc) in high/low *
' * Responsible:   Ramiro Sanchez                                       *
' * Date:          05/21/2008                                           *
' * Notes:                                                              *
' * 02/22/2011     remove input two fro MT2500                          *
' ***********************************************************************

' --------------------------------------------------------------------
' General configuration
' --------------------------------------------------------------------
AT&F
AT+GSN
AT$PKG?
AT$MDMID?
at$Areg=0
at+cgdcont=1,"IP","internet3.voicestream.com"
at$friend=1,1,"209.42.60.137"
at$udpapi=,1720

' --------------------------------------------------------------------
' AT commands storege
' --------------------------------------------------------------------
at$stoatev=1,at$msgsnd=0,"Input 0 OFF"
at$stoatev=2,at$msgsnd=0,"Input 0 ON"


' --------------------------------------------------------------------
' Define IO dbounce
' --------------------------------------------------------------------
AT$IODBNC=1,3

' --------------------------------------------------------------------
' IO1 low
' --------------------------------------------------------------------
at$event=10,0,0,0,0
at$event=10,3,44,1,0

' --------------------------------------------------------------------
' IO1 high
' --------------------------------------------------------------------
at$event=11,0,0,1,1
at$event=11,3,44,2,0


at$areg=2
at&w


