Shop OBEX P1 Docs P2 Docs Learn Events
BS1 Code to BS2 — Parallax Forums

BS1 Code to BS2

ajajackajajack Posts: 26
edited 2007-09-10 10:55 in BASIC Stamp
I need help converting this BS1 Code to BS2:

symbol dat = b2
symbol synch = b3
symbol junk = b4
synch = "A"
junk = 126

start:
pause 1000
for dat = 1 to 255
· serout 0,N2400,(junk,synch,dat)
· pause 50
next
· serout 0,N2400,(junk,synch,0)
· goto start

Comments

  • FranklinFranklin Posts: 4,747
    edited 2007-09-09 23:55
    junk con 126
    sync con "A" ' not sure on this
    dat var byte

    start:
    pause 1000
    for dat = 1 to 255
    serout 0,N2400,(junk,synch,dat)
    pause 50
    next
    serout 0,N2400,(junk,synch,0)
    goto start

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • ajajackajajack Posts: 26
    edited 2007-09-10 00:18
    Its still not working.
  • FranklinFranklin Posts: 4,747
    edited 2007-09-10 00:25
    Take a look at the help file for serout and make sure you have the correct baud rate. Also I spelled synch wrong in my code. Try replacing the serout lines with debug and see just what the stamp is sending.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • ajajackajajack Posts: 26
    edited 2007-09-10 00:30
    It is not even passing the syntax check giving me an error on N2400 as Unidentified symbol.
  • FranklinFranklin Posts: 4,747
    edited 2007-09-10 03:05
    Take a look at the help file for serout and make sure you have the correct baud rate

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • TechnoRobboTechnoRobbo Posts: 323
    edited 2007-09-10 10:55
    The BS1

    serout 0,N2400,(junk,synch,0)

    is wrtitten as

    serout 0,16780,[noparse]/noparse][/b]junk,synch,0[b

    on a BS2

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Have Fun


    TR

    Post Edited (TechnoRobbo) : 9/10/2007 11:00:27 AM GMT
Sign In or Register to comment.