Shop OBEX P1 Docs P2 Docs Learn Events
Serial communication with PC using BS2sx — Parallax Forums

Serial communication with PC using BS2sx

gregory12345gregory12345 Posts: 10
edited 2009-05-17 05:08 in BASIC Stamp
Hi, i am having problems with converting SERIN command from BS1 to BS2sx,
can anyone help me out converting this:
(BS1)
symbol pos = B2
symbol servo = B3
symbol cont = B4

start:
SERIN 0,N2400,servo,pos
move:
FOR cont = 0 TO 100
PULSOUT servo,pos
PAUSE 10
NEXT cont
GOTO start

so far, i can convert it to:
(BS2)
pos VAR B2
servo VAR B3
cont VAR B4

start:
SERIN 0,17405,servo,pos --> it keeps on coming that i need a label here, (ade idea what i shoud put here?)
move:
FOR cont = 0 TO 100
PULSOUT servo,pos
PAUSE 10
NEXT cont
GOTO start

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-05-16 05:20
    The format of SERIN is different. Read the chapter in the Manual (Parallax Stamp Basic Syntax and Reference Manual) on SERIN. In your case, it would be "SERIN 0,17405,[noparse][[/noparse]servo,pos]".
  • gregory12345gregory12345 Posts: 10
    edited 2009-05-17 05:08
    Thank you mike!
Sign In or Register to comment.