how to add a statment on " "
KARIM102
Posts: 75
A var word
DO
SERIN 15 , 84, [WAIT(">"),A] ' Wait to recived SMS
IF A = "Light" THEN
' order to be make
HIGH 0
PAUSE 1000
why i can't use "light" as my commad? only one light is accepted? like "L"
could i use word like "light"???
reg
DO
SERIN 15 , 84, [WAIT(">"),A] ' Wait to recived SMS
IF A = "Light" THEN
' order to be make
HIGH 0
PAUSE 1000
why i can't use "light" as my commad? only one light is accepted? like "L"
could i use word like "light"???
reg
Comments
A VAR BYTE(6) ' 6 bytes long
SERIN 15, 84, [WAIT(">"), STR A\6\13] ' A ">" then a 1 to 5 character word, then a carriage return
IF A(0) = "L" and A(1) = "i" and A(2) = "g" and A(3) = "h" and A(4) = "t" and A(5) = 0 THEN
The test for the last byte being zero is there because STR fills out the byte array with zeroes.