Include "MODEDEFS.BAS"
num var byte[13]
sum var byte[22]
c var byte
baud con 188
sum[0] = "A"
sum[1] = "T"
sum[2] = "+"
sum[3] = "C"
sum[4] = "M"
sum[5] = "G"
sum[6] = "S"
sum[7] = "="
sum[21]= 13
Serin2 rx,baud,5000,main,[WAIT("REC UNREAD"),SKIP 3,
STR num\13, skip 28, STR sms\8]
checkms:
If sms[0]="d" and sms[1]="e" and sms[2]="a" and sms[3]="c" and sms[4]="t" then
For c=0 to 12
sum[c+8]=num[c]
next c
For c=0 to 21
serout tx,T2400,[sum[c]]
next c
Serin2 rx,baud,5000,checkms,[WAIT(">")]
The above (marked in red) are the correction needed.
Al.
Last edited by aratti; - 7th October 2009 at 23:40.
All progress began with an idea
Bookmarks