Basic Stamp
leshea2
Posts: 83
Hi, can anyone tell me·what's wrong with·this command and how I could fix it·?
' {$STAMP BS2sx}
' {$PBASIC 2.5}
KAA DATA "Call 18004459889 at 4:35 p.m."
MAR······ VAR······ Word
counter·· VAR······ Byte
R········ PIN······ 0
FOR counter = 1 TO 1
PAUSE 1000
READ KAA, MAR
NEXT
SEROUT R, 17405, [noparse][[/noparse]MAR]
END
I'm trying to·get the basic stamp to serout that code to another device to program it the device to do·as the code·says.
Thanks in advance !
' {$STAMP BS2sx}
' {$PBASIC 2.5}
KAA DATA "Call 18004459889 at 4:35 p.m."
MAR······ VAR······ Word
counter·· VAR······ Byte
R········ PIN······ 0
FOR counter = 1 TO 1
PAUSE 1000
READ KAA, MAR
NEXT
SEROUT R, 17405, [noparse][[/noparse]MAR]
END
I'm trying to·get the basic stamp to serout that code to another device to program it the device to do·as the code·says.
Thanks in advance !
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
But can you tell me why you added the 0 to the data command, and also, would I need to use the else command after IF (char = 0) THEN EXIT, ?
Again, thanks !
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Thanks !
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Send_Msg:
DO
READ eePntr, char
eePntr = eePntr + 1
IF (char = 0) THEN EXIT
SEROUT Sout, Baud, [noparse][[/noparse]char]
LOOP
RETURN
was successful executed ?
Thanks !
' {$STAMP BS2sx}
' {$PBASIC 2.5}
Sout PIN 0
Baud CON 17405
eePntr VAR Word
char VAR Byte
Msg1 DATA "Call 18004459889 at 4:35 p.m.", 0
Main:
eePntr = Msg1
GOSUB Send_Msg
END
Send_Msg:
DO
READ eePntr, char
eePntr = eePntr + 1
IF (char = 0) THEN EXIT
SEROUT Sout, Baud, [noparse][[/noparse]char]
LOOP
RETURN
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax