Shop OBEX P1 Docs P2 Docs Learn Events
Does WAIT mean wait? — Parallax Forums

Does WAIT mean wait?

ArchiverArchiver Posts: 46,084
edited 2001-03-09 05:25 in General Discussion
Does anyone know if the BS2 can continue to process code after a
SERIN WAIT?

Martin

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2001-03-09 05:25
    >Does anyone know if the BS2 can continue to process code after a
    >SERIN WAIT?
    >
    >Martin

    Hi Martin,

    If you mean, "does it process code _while_ it is waiting", the answer
    is no. The Stamp can only do one thing at a time. Example:

    serin dpin,baudmode,[noparse][[/noparse]wait ("hello")]

    The stamp will sit there stuck in that one command until it receives
    the "hello". But once it does, yes, then it will continue to process
    code. More:

    serin dpin,baudmode,1000,noHello,[noparse][[/noparse]wait ("hello")]

    This is the same thing, but it has a timeout. If one second (1000
    milliseconds) goes by without receiving a character, the program will
    branch to the label "noHello". The one second timeout is reset if
    any character at all comes in over the serial line. It has nothing
    to do with receiving the whole "hello".

    I hope that helps,

    -- regards,
    Tracy Allen
    electronically monitored ecosystems
    http://www.emesystems.com
Sign In or Register to comment.