Shop OBEX P1 Docs P2 Docs Learn Events
What for a string and CR — Parallax Forums

What for a string and CR

SweLoganSweLogan Posts: 11
edited 2006-03-25 17:51 in BASIC Stamp
Hi all!
I have a problem, i want ro reseve a string and a CR [noparse][[/noparse]enter] after that the program will go to "Check TAG"
The CR will tell my program that the sting input is over.
Also, i want to have a timeout funktion, so if the program has not reseve any information in 2 sec the program will go to "Error"

SERIN 16, Baud, ????

Comments

  • Tracy AllenTracy Allen Posts: 6,662
    edited 2006-03-25 17:51
    Which Basic Stamp?

    tagstring VAR byte(10) ' can hold up to 10 chars
    SERIN 16,Baudmode,2000,timout,[noparse][[/noparse]STR tagstring\10\13] ' end at 10 chars or CR, whichever first

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
Sign In or Register to comment.