Shop OBEX P1 Docs P2 Docs Learn Events
comparing of data and text? — Parallax Forums

comparing of data and text?

ice-egozice-egoz Posts: 55
edited 2004-08-12 05:30 in BASIC Stamp
Hi, I want to check whether input data can be compared to· text?


This is my code-->
does my code even brings in the msg data??

Start:····· 'Read Message
SEROUT toModem, Baud, [noparse][[/noparse]"AT+CMGR=1"]··· 'Read Message = "Shut Down"
DEBUG "AT+CMGR=1"
PAUSE 5000
SEROUT toModem, Baud, [noparse][[/noparse]CR,LF]
DEBUG CR,LF
SERIN thruModem, Baud, [noparse]/noparse][color=blue]serData[/color·· 'the data is saved in serData as WORD provided that the msg(onli msg)
·················································' comes in thru serin and saved to serData
DEBUG "serData"
'SERIN toModem, Baud, [noparse][[/noparse]CR,LF]····· 'is this necessary? this has an error
'DEBUG CR,LF
SEROUT toModem, Baud, [noparse][[/noparse]"AT+CMGD=1"]···· 'delete message after getting in the data
DEBUG "AT+CMGD=1"
SEROUT toModem, Baud, [noparse][[/noparse]CR,LF]
DEBUG CR,LF
GOTO checking

''''''''''''''''''''''''''''''''Data'''''''''''''''''''''''''''''''''''''''''''''''''''''''
checking:
IF (serData = "Shut Down") THEN shutDown
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
shutDown:············ ' Off the Alarm
'sirenPin LOW··········· ' Put Siren to LOW/%00
·GOTO secMessage····· ' Go to reply owner 2nd time

secMessage:············· '2nd msg to owner informing about succesful switching off the alarm
· SEROUT toModem, baud, [noparse][[/noparse]"AT"]
· DEBUG "AT"
· SEROUT toModem, baud, [noparse][[/noparse]CR,LF]
· DEBUG CR,LF
· PAUSE pauses

· SEROUT toModem, baud, [noparse][[/noparse]"AT+CMGF=1"]·········· 'Assign Text Mode
· DEBUG "AT+CMGF=1"
· SEROUT toModem, baud, [noparse][[/noparse]CR,LF]
· DEBUG CR,LF···················· ' Carraige Return ot 'Enter'
· PAUSE pauses
· 'AT+CMGS=90225042[noparse][[/noparse]ENTER]
· SEROUT toModem, baud, [noparse][[/noparse]"AT+CMGS"]············ 'Send 2nd Message to Owner
· DEBUG "AT+CMGS"
· SEROUT toModem, baud, [noparse][[/noparse]61]
· DEBUG 61····································· 'ASCII Equivalent for =
· SEROUT toModem, baud, [noparse][[/noparse]"91918287"]············ 'Liling's number
· DEBUG "91918287"······························ 'dest(Liling) mobile no
· SEROUT toModem, baud, [noparse][[/noparse]CR,LF]
· DEBUG CR,LF
· PAUSE pauses
· '>MSG^Z
· SEROUT toModem, baud, [noparse][[/noparse]"Alarm Off Successful"]·········· 'MSG Successful.
· DEBUG "Alarm off Successful"···························· 'msg
· SEROUT toModem, baud, [noparse][[/noparse]26]
· DEBUG 26
· PAUSE pauses

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I need all ya guidance Masters. [noparse]:)[/noparse]
Sign In or Register to comment.