I just received the 912Mhz modules and am using the instructions but am only getting·random letters from "Hello World"·that I am trying to send! Any help? Attached is my test code
Your BS2 receive program is attempting to receive and display one character at a time. The BASIC Stamps are single-tasking, which means that all serial I/O is done in the foreground. While you're sending one character to DEBUG, the character (or two) after it is already coming in and being missed. The reason you're seeing garbage is that one of a subsequent character's data bits is being mistaken for a start bit, putting the serial receiver out of sync.
It would be better to prepend your message with a unique string of characters, which you can wait for using the WAIT modifier in SERIN. Then input the requisite number of characters after that into a byte array using STR. Once all the characters have been read in, then you can output them to DEBUG.
Ok so I tried what you said, and I am not getting any funky characters, but am not still getting the whole statement. Heres the revised code. Any help are example? Thanks in advanced
Read the manual for the DEBUG statement. There you will find that it, too, supports the STR modifier. As it stands, your receive program is asking DEBUG to print only the first character of the array.
Comments
It would be better to prepend your message with a unique string of characters, which you can wait for using the WAIT modifier in SERIN. Then input the requisite number of characters after that into a byte array using STR. Once all the characters have been read in, then you can output them to DEBUG.
-Phil
-Phil