Shop OBEX P1 Docs P2 Docs Learn Events
bs rev D. code help — Parallax Forums

bs rev D. code help

ArchiverArchiver Posts: 46,084
edited 2003-11-13 23:16 in General Discussion
I bought the pololu micro duel motor controller to make a little bot that runs
into things and backs up then turns the opposite way. here is a piece of the
code

symbol speed=b1
low 15
high 15
for speed=0 to 127
serout 14,32,[noparse][[/noparse]$80,0,0,speed]
pause 20
next
for speed=127 to 0
serout 14,32,[noparse][[/noparse]$80,0,0,speed]
pause 20
next


the stamp program says that " [noparse][[/noparse] " is an unrecognized character. Does anybody
know how I can change this so I can get the code to work. I am still a newbie at
all of this and havent really put any work into all the code yet.


Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard

[noparse][[/noparse]Non-text portions of this message have been removed]

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-11-13 05:09
    At 06:33 PM 11/12/03 -0800, Kyle Cooper wrote:
    >I bought the pololu micro duel motor controller to make a little bot that
    >runs into things and backs up then turns the opposite way. here is a piece
    >of the code
    >
    >symbol speed=b1
    >low 15
    >high 15
    >for speed=0 to 127
    > serout 14,32,[noparse][[/noparse]$80,0,0,speed]
    > pause 20
    >next
    >for speed=127 to 0
    > serout 14,32,[noparse][[/noparse]$80,0,0,speed]
    > pause 20
    >next
    >
    >
    >the stamp program says that " [noparse][[/noparse] " is an unrecognized character. Does
    >anybody know how I can change this so I can get the code to work. I am
    >still a newbie at all of this and havent really put any work into all the
    >code yet.

    The BS-1 uses round brackets "(" and the BS-2 series uses square "[noparse][[/noparse]" brackets
    around the SERIN/SEROUT input or output variable list. Make that change "[noparse][[/noparse]
    ... ]"
    to "( ... )" and you should be good to go.

    Regards,

    Bruce Bates




    >
    >Do you Yahoo!?
    >Protect your identity with Yahoo! Mail AddressGuard
    >
    >[noparse][[/noparse]Non-text portions of this message have been removed]
    >
    >
    >To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    >from the same email address that you subscribed. Text in the Subject and
    >Body of the message will be ignored.
    >
    >
    >Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
  • ArchiverArchiver Posts: 46,084
    edited 2003-11-13 14:23
    The problem is that you're attempting to use BS2 syntax with a BS2
    controller. Change your SEROUT lines so they look like this:

    SEROUT 14, T2400, ($80, 0, 0, speed)

    Note that the BS1 has named baud rate parameters so you have to fix that
    in addition to the change from square brackets to parenthesis.

    -- Jon Williams
    -- Applications Engineer, Parallax
    -- Dallas Office


    Original Message
    From: Kyle Cooper [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=uQrw2tjzwTKaeHc6Ktqog4bF3rncDyvj2oDPjSk1eoe58CHUPgsgN1XNmwZqRIpGAKZ_qweoycSPC8A]crazykurby@y...[/url
    Sent: Wednesday, November 12, 2003 8:34 PM
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] bs rev D. code help


    I bought the pololu micro duel motor controller to make a little bot
    that runs into things and backs up then turns the opposite way. here is
    a piece of the code

    symbol speed=b1
    low 15
    high 15
    for speed=0 to 127
    serout 14,32,[noparse][[/noparse]$80,0,0,speed]
    pause 20
    next
    for speed=127 to 0
    serout 14,32,[noparse][[/noparse]$80,0,0,speed]
    pause 20
    next


    the stamp program says that " [noparse][[/noparse] " is an unrecognized character. Does
    anybody know how I can change this so I can get the code to work. I am
    still a newbie at all of this and havent really put any work into all
    the code yet.


    Do you Yahoo!?
    Protect your identity with Yahoo! Mail AddressGuard

    [noparse][[/noparse]Non-text portions of this message have been removed]


    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject
    and Body of the message will be ignored.


    Your use of Yahoo! Groups is subject to
    http://docs.yahoo.com/info/terms/




    This message has been scanned by WebShield. Please report SPAM to
    abuse@p....
  • ArchiverArchiver Posts: 46,084
    edited 2003-11-13 23:15
    thanks a lot Jon

    Jon Williams <jwilliams@p...> wrote:The problem is that you're
    attempting to use BS2 syntax with a BS2
    controller. Change your SEROUT lines so they look like this:

    SEROUT 14, T2400, ($80, 0, 0, speed)

    Note that the BS1 has named baud rate parameters so you have to fix that
    in addition to the change from square brackets to parenthesis.

    -- Jon Williams
    -- Applications Engineer, Parallax
    -- Dallas Office


    Original Message
    From: Kyle Cooper [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=qOoxeEEnpMHBiSVIowcX5RLhAQS3Pg9DtEfBC0I3t3mKdnANDmhOkUKivpPRb-x18hc00os_YcUzTprL3IF2]crazykurby@y...[/url
    Sent: Wednesday, November 12, 2003 8:34 PM
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] bs rev D. code help


    I bought the pololu micro duel motor controller to make a little bot
    that runs into things and backs up then turns the opposite way. here is
    a piece of the code

    symbol speed=b1
    low 15
    high 15
    for speed=0 to 127
    serout 14,32,[noparse][[/noparse]$80,0,0,speed]
    pause 20
    next
    for speed=127 to 0
    serout 14,32,[noparse][[/noparse]$80,0,0,speed]
    pause 20
    next


    the stamp program says that " [noparse][[/noparse] " is an unrecognized character. Does
    anybody know how I can change this so I can get the code to work. I am
    still a newbie at all of this and havent really put any work into all
    the code yet.


    Do you Yahoo!?
    Protect your identity with Yahoo! Mail AddressGuard

    [noparse][[/noparse]Non-text portions of this message have been removed]


    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject
    and Body of the message will be ignored.


    Your use of Yahoo! Groups is subject to
    http://docs.yahoo.com/info/terms/




    This message has been scanned by WebShield. Please report SPAM to
    abuse@p....


    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject and Body of
    the message will be ignored.


    Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/




    Do you Yahoo!?
    Protect your identity with Yahoo! Mail AddressGuard

    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2003-11-13 23:16
    Thank you Bruce

    Bruce Bates <bvbates@u...> wrote:At 06:33 PM 11/12/03 -0800, Kyle
    Cooper wrote:
    >I bought the pololu micro duel motor controller to make a little bot that
    >runs into things and backs up then turns the opposite way. here is a piece
    >of the code
    >
    >symbol speed=b1
    >low 15
    >high 15
    >for speed=0 to 127
    > serout 14,32,[noparse][[/noparse]$80,0,0,speed]
    > pause 20
    >next
    >for speed=127 to 0
    > serout 14,32,[noparse][[/noparse]$80,0,0,speed]
    > pause 20
    >next
    >
    >
    >the stamp program says that " [noparse][[/noparse] " is an unrecognized character. Does
    >anybody know how I can change this so I can get the code to work. I am
    >still a newbie at all of this and havent really put any work into all the
    >code yet.

    The BS-1 uses round brackets "(" and the BS-2 series uses square "[noparse][[/noparse]" brackets
    around the SERIN/SEROUT input or output variable list. Make that change "[noparse][[/noparse]
    ... ]"
    to "( ... )" and you should be good to go.

    Regards,

    Bruce Bates




    >
    >Do you Yahoo!?
    >Protect your identity with Yahoo! Mail AddressGuard
    >
    >[noparse][[/noparse]Non-text portions of this message have been removed]
    >
    >
    >To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    >from the same email address that you subscribed. Text in the Subject and
    >Body of the message will be ignored.
    >
    >
    >Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/


    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject and Body of
    the message will be ignored.


    Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/




    Do you Yahoo!?
    Protect your identity with Yahoo! Mail AddressGuard

    [noparse][[/noparse]Non-text portions of this message have been removed]
Sign In or Register to comment.