07-22-2009, 02:11 AM
here is the code in basicstamp2. We have it working with boebot and basicstamp. If possible, can somebody convert this to .spin file.
' {$STAMP BS2}
sData VAR Byte
SEROUT 2,84, ["at#bnd=1",CR] ' Sets for US network
PAUSE 1000
SEROUT 2,84, ["AT+CMGF=1",CR] ' Sets the module in voice mode (AT+CMGF=1 IS TEXT MODE FCLASS)
PAUSE 1000
SEROUT 2,84, ["ats0=2",13] ' Sets to
PAUSE 1000
SEROUT 2,84, ["AT+CLIP=1",CR] ' Sets to show caller ID (if you want)
PAUSE 1000
SEROUT 2, 84, ["AT+CMGS=+12246169564",CR]
PAUSE 5000
SEROUT 2, 84, ["hello",26]
PAUSE 1000
SEROUT 2,84, ["at",CR] ' Sets for US network
PAUSE 1000
'SEROUT 2,84, ["at#bnd=1",CR] ' Sets for US network
' This code simulates trying to wait for data to come through
DO ' NOTE: This should work, otherwise we need to simiuate manually (worst case scenario..but we'l have it working
SERIN 1,84, [DEC sData] ' Also note, I used PIN 1 to receive data from the other GSM Module
DEBUG sData
PAUSE 5000
LOOP
END
' {$STAMP BS2}
sData VAR Byte
SEROUT 2,84, ["at#bnd=1",CR] ' Sets for US network
PAUSE 1000
SEROUT 2,84, ["AT+CMGF=1",CR] ' Sets the module in voice mode (AT+CMGF=1 IS TEXT MODE FCLASS)
PAUSE 1000
SEROUT 2,84, ["ats0=2",13] ' Sets to
PAUSE 1000
SEROUT 2,84, ["AT+CLIP=1",CR] ' Sets to show caller ID (if you want)
PAUSE 1000
SEROUT 2, 84, ["AT+CMGS=+12246169564",CR]
PAUSE 5000
SEROUT 2, 84, ["hello",26]
PAUSE 1000
SEROUT 2,84, ["at",CR] ' Sets for US network
PAUSE 1000
'SEROUT 2,84, ["at#bnd=1",CR] ' Sets for US network
' This code simulates trying to wait for data to come through
DO ' NOTE: This should work, otherwise we need to simiuate manually (worst case scenario..but we'l have it working
SERIN 1,84, [DEC sData] ' Also note, I used PIN 1 to receive data from the other GSM Module
DEBUG sData
PAUSE 5000
LOOP
END