Shop OBEX P1 Docs P2 Docs Learn Events
Using Visual Basic to control a BS2 SumoBot — Parallax Forums

Using Visual Basic to control a BS2 SumoBot

ArchiverArchiver Posts: 46,084
edited 2004-03-26 16:45 in General Discussion
Hello everyone. I was just wondering if I can use Visual Basic to
control or program a BS2 SumoBot. I want to build an interface using
VB and connect it to the robot via serial port. I hope that someone
can help me here as I'm very new in this topic.

Thanx in advance.

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2004-03-25 16:41
    If you're not already an expert programmer you're in for a long
    frustrating haul. On our web site you'll find tools to compiler and
    download PBASIC source code. What your program will have to do is
    generate PBASIC source code from your interface, then send it to the
    compiler (DLL for Windows).

    It can be done ... but it won't be easy. We did this for our GUI-Bot
    interface (we didn't use VB, but the process is the same) and it was a
    lot of work.

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


    Original Message
    From: eliza_yasmin [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=LMYqBi57EKHUhJCG4hu5P0WtFPbOm2hFnD_oOciYMsUfqdvGY-cWV5kjER7lapt9bDU_wbHv-_xOr1g8OCP1]eliza_yasmin@y...[/url
    Sent: Thursday, March 25, 2004 3:46 AM
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] Using Visual Basic to control a BS2 SumoBot


    Hello everyone. I was just wondering if I can use Visual Basic to
    control or program a BS2 SumoBot. I want to build an interface using
    VB and connect it to the robot via serial port. I hope that someone
    can help me here as I'm very new in this topic.

    Thanx in advance.
  • ArchiverArchiver Posts: 46,084
    edited 2004-03-25 18:42
    In the Files area, see AlDemo/BS2_VBDemo.zip.
    This is a simple example, for both sides, of
    how to talk to the BS2 with VB over the serial
    port.

    Having said that, you can CONTROL a BS2 Sumobot
    with this approach, but you'll still have to
    PROGRAM the SumoBot BS2 with the Parallax IDE.

    You'll need to decide what you want to tell the
    BS2 (Go straight, turn left, did IR hit?, etc)
    and design a simple set of messages to send
    back and forth. Once you've done that you can
    program the BS2 to respond to the messages
    using the IDE. You then program the PC with
    VB to make a user interface which will send
    and report the messages sent. Hook them both
    together and off you go.


    --- In basicstamps@yahoogroups.com, "eliza_yasmin"
    <eliza_yasmin@y...> wrote:
    > Hello everyone. I was just wondering if I can use Visual Basic to
    > control or program a BS2 SumoBot. I want to build an interface
    using
    > VB and connect it to the robot via serial port. I hope that someone
    > can help me here as I'm very new in this topic.
    >
    > Thanx in advance.
  • ArchiverArchiver Posts: 46,084
    edited 2004-03-26 13:25
    Wow. I must be prepared for the frustrating haul. I
    already have the Basic Stamp Editor in my pc. I would
    appreciate if u could explain to me what I need to do
    step by step. What I have in mind is:

    1) Connect the robot to the pc via serial port.
    2) Build the interface (Attached are the Grid Plan)
    using VB.
    3) User will click at any Lot (lets say Lot A), then
    the robot will go to Lot A along the route from a
    fixed location.
    4) I need to program the robot (to move to the front,
    left or right) based on the gridpoints in VB. This
    will be done using the Editor am I right?

    But the question is, can Basic Stamp communicate with
    VB?


    --- Jon Williams <jwilliams@p...> wrote:
    > If you're not already an expert programmer you're in
    > for a long
    > frustrating haul. On our web site you'll find tools
    > to compiler and
    > download PBASIC source code. What your program will
    > have to do is
    > generate PBASIC source code from your interface,
    > then send it to the
    > compiler (DLL for Windows).
    >
    > It can be done ... but it won't be easy. We did
    > this for our GUI-Bot
    > interface (we didn't use VB, but the process is the
    > same) and it was a
    > lot of work.
    >
    > -- Jon Williams
    > -- Applications Engineer, Parallax
    > -- Dallas Office
    >
    >
    >
    Original Message
    > From: eliza_yasmin [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=UoZdEa8aVgPKSqk2jW8r6PnLpwCLcrMuCaRzm5c13C4-FXLnfpG4UyM0obmDtzvhQ9XrJ7ICu5B55UOA9RVlDA]eliza_yasmin@y...[/url
    > Sent: Thursday, March 25, 2004 3:46 AM
    > To: basicstamps@yahoogroups.com
    > Subject: [noparse][[/noparse]basicstamps] Using Visual Basic to control
    > a BS2 SumoBot
    >
    >
    > Hello everyone. I was just wondering if I can use
    > Visual Basic to
    > control or program a BS2 SumoBot. I want to build an
    > interface using
    > VB and connect it to the robot via serial port. I
    > hope that someone
    > can help me here as I'm very new in this topic.
    >
    > Thanx in advance.
    >
    >
    > 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.
    >
    > Yahoo! Groups Links
    >
    >
    > basicstamps-unsubscribe@yahoogroups.com
    >
    >
    >


    __________________________________
    Do you Yahoo!?
    Yahoo! Finance Tax Center - File online. File on time.
    http://taxes.yahoo.com/filing.html

    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2004-03-26 16:45
    Yes, you can use VB to communicate with the BASIC Stamp. Check this:

    http://www.parallax.com/dl/docs/cols/nv/vol3/col/nv89.pdf

    There is a difference between communication and reprogramming, however.
    If you just want to communicate, using a command processor program on
    your SumoBot(r), then it won't be a big task beyond the creation of your
    VB program (which we won't discuss here -- this forum is about BASIC
    Stamp programming).

    Between the article sited above and your personal VB skills, you should
    be able to do what you suggest in #3 below.

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


    Original Message
    From: Eliza Yasmin [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=VLdNXne71G9nNCSQtvoM2g5KGRMPA3egY4oIPIRk9uAdqZbR-WmoH5az4wOB3g4uqkF5uvjni8VaNTGsa948YS0]eliza_yasmin@y...[/url
    Sent: Friday, March 26, 2004 7:26 AM
    To: basicstamps@yahoogroups.com
    Subject: RE: [noparse][[/noparse]basicstamps] Using Visual Basic to control a BS2 SumoBot


    Wow. I must be prepared for the frustrating haul. I
    already have the Basic Stamp Editor in my pc. I would appreciate if u
    could explain to me what I need to do step by step. What I have in mind
    is:

    1) Connect the robot to the pc via serial port.
    2) Build the interface (Attached are the Grid Plan)
    using VB.
    3) User will click at any Lot (lets say Lot A), then
    the robot will go to Lot A along the route from a
    fixed location.
    4) I need to program the robot (to move to the front,
    left or right) based on the gridpoints in VB. This
    will be done using the Editor am I right?

    But the question is, can Basic Stamp communicate with
    VB?
Sign In or Register to comment.