Shop OBEX P1 Docs P2 Docs Learn Events
Communicating the BS2 with a PC running a RobotBASIC program using Serial I/O. — Parallax Forums

Communicating the BS2 with a PC running a RobotBASIC program using Serial I/O.

SamMishalSamMishal Posts: 468
edited 2009-05-17 02:09 in Robotics
Hi All,

Many people have written with questions about how to implement serial communications between the Basic Stamp and RobotBASIC. The questions have made me realize that that many are confused by the serial I/O abilities of RobotBASIC and even how to setup a link between the PC and the BS2.

I have prepared two papers that may be of use to you.

The first paper details how to program RobotBASIC to do serial communications with a Basic Stamp using the BS2 as a particular example. The demo programs allow you to specify two 16-bit numbers on the PC side and then with the push of a button they are sent (binary in one demo and text in another) to the BS2 which adds them and sends the result back (text in one demo and binary in the other) to RB which displays it on the PC.

The paper details how to utilize RobotBASIC's serial communications system and its byte buffer functions and other functions. Here is the link:
http://www.robotbasic.org/resources/RobotBASIC_Serial_IO.pdf


Some people may not be familiar with how to install the physical wiring and what ports to use and so forth. This paper shows how you can configure a setup using the BS2 as a particular example and details what to do with the BS2 to be able to carry out serial communications between it and RobotBASIC, with programs for the BS2 and for RB. Here is the link:
http://www.robotbasic.org/resources/RobotBASIC_To_BS2_Comms.pdf


Furthermore, I shall soon be doing a paper about doing TCP and UDP communications over the LAN or the WAN (Internet) so keep checking back here for it.
·
In a recent post I posted a zip file that included the source code as well as the EXEs for two programs that use RB’s internet abilities and its integrated simulated robot to implement a system which allows you to control the simulated robot running on one PC from another PC over the LAN (or WAN).
Since RobotBASIC has an inbuilt protocol to control a BoeBot using a Bluetooth link, you certainly can use these two programs to control a BoeBot by linking the simulated robot to the REAL BoeBot over a Bluetooth link from the PC running the robot side of the two programs. All WIRELESSLY using Bluetooth and WiFi.
·
Here is the link to the zip file in case you missed it in the previous posting:
http://www.robotbasic.org/resources/TCP_Robot.zip


Happy roboting..


Samuel

Post Edited (SamMishal) : 5/17/2009 2:23:24 AM GMT
Sign In or Register to comment.