BS2P to BS2
robban35
Posts: 32
Hi!
I am trying to send a word from my BS2p to my BS2.
Here´s the program for BS2p
' {$STAMP BS2p}
' {$PBASIC 2.5}
t:
SEROUT 2, 17405,["HELLO"]
goto t
here´s my BS2 program
t:
sdata VAR word
SERIN 0, 16780, [sData]
DEBUG sdata,CR
PAUSE 1000
GOTO t
but all i get is a bunch of numbers or no recieve
please help.
regards
Robban
I am trying to send a word from my BS2p to my BS2.
Here´s the program for BS2p
' {$STAMP BS2p}
' {$PBASIC 2.5}
t:
SEROUT 2, 17405,["HELLO"]
goto t
here´s my BS2 program
t:
sdata VAR word
SERIN 0, 16780, [sData]
DEBUG sdata,CR
PAUSE 1000
GOTO t
but all i get is a bunch of numbers or no recieve
please help.
regards
Robban
Comments
Look in the Basic Stamp Syntax and Reference Manual in the chapters on the SERIN and SEROUT statements for descriptions of what they can do, what kinds of data they can receiver and transmit, and how to write the various "formatters".
Look particularly at the description of the STR formatter. Remember that the Stamps don't have real strings like what you'll find in PC versions of Basic. There's limited variable storage on the Stamps (a total of 26 bytes on the BS2) and each character of a string takes a byte. The BS2p has more storage, but it's a different area and not usable for variables. There's a way to receive bytes (SPSTR formatter) into this separate area and access them (GET and PUT statements), but it's not really a string variable.