Shop OBEX P1 Docs P2 Docs Learn Events
Send and Receive Number Using SEROUT / SERIN — Parallax Forums

Send and Receive Number Using SEROUT / SERIN

kenwtnkenwtn Posts: 250
edited 2008-05-31 14:30 in BASIC Stamp
Hi,

··· I have 2 BS2's connected and I am able to send a character between them. My problem is I need to send a number like 360 from one to the other. Can anyone help me out with the commands I need on the Master and Slave?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-05-31 14:25
    Read the chapters in the manual on the SEROUT / SERIN statements, particularly the parts on the "formatters" like DEC / HEX
  • kenwtnkenwtn Posts: 250
    edited 2008-05-31 14:30
    I tried what I read:

    Master

    Reset:
    Command = 99

    SEROUT Slave\FC, Baud, 200, ResetIt, [noparse][[/noparse]DEC2 Command]
    DEBUG "success"
    STOP
    ResetIt:
    GOTO Reset
    PAUSE 100


    SLAVE
    ResetController:

    SERIN ComLine\FC, Baud, 200, ResetController, [noparse][[/noparse]DEC2 Command]
Sign In or Register to comment.