switches around its perimeter (the
same as the standard RobotBASIC
simulation). This means that the only
routines we must complete will be
those that control the servo motors
and read the bumper sensors. The I/O
pins used for all the devices will
be specified in the code. We used
Parallax’s EB500 transceiver to provide
the Bluetooth communication for the
robot and a Bluetooth USB adapter
for the PC.
Remember, this is only an example
program to demonstrate the concepts.
You can use any language and any
microcontroller.
Controlling The Real Robot
Once you have installed a proper
hardware-level control program on
your robot, you can use the remote-control program of Figure 3 (or
any RobotBASIC program) to control
your target machine. This is the
purpose of the rCommPort command
discussed earlier. This command tells
RobotBASIC to use the serial port
specified to communicate with the
microcontroller of the real robot. This
serial port can be a real serial port
or a virtual one that is set up by a
USB device driver or a Bluetooth
device driver.
If the port number specified in the
rCommPort statement is non-zero,
RobotBASIC will immediately start
communicating with the target robot,
according to the protocol described
earlier. As long as the target robot has
the proper hardware-level control
program, the real robot will respond in
the same manner as the simulated
robot. For example, if you are running
the remote-control program and press
the Up-Arrow key, the real robot will
move forward unless the front bumper
is in contact with an object. In the real
mode, the bumper status displayed on
the screen will be that of the real
robot, not the simulation.
Note: If you want to experiment
with the concepts in this article and do
not have and do not wish to buy
wireless transceivers, you will be able
to do so using a direct serial wire
between the PC and the BS2 (or
whatever controller you choose).
This and many other options for
implementing a communication link
between the BS2 and PC are described
in a PDF document that you can
download from www.RobotBASIC.
com. The document will also show
how to experiment with the software
without having to have an actual
robot, just the BS2 and some push
buttons and LEDs. You can also download the programs shown in the article
and the latest version of RobotBASIC.
As you can see, RobotBASIC is a
powerful robot language, but it can also
be used for nearly any control application. There are serial and parallel I/O
commands not discussed here that provide many options for communicating
with external circuitry, thus facilitating
the development of numerous types of
electronic projects. SV
1st Annual Hitec Robotics Cup
Hitec Robotics invites all humanoid roboticists this April 25th-
27th at EFX (the Electric Flight Expo) at the University of Phoenix
Stadium in sunny Arizona. Humanoid robots of all types and
brands (both homemade and kit-form) are welcome to compete
in the first annual Hitec Robotics Cup.
The Hitec Robotics Cup is composed of three different events:
Robo Speed: Robot sprint of 3m
Robo Mission: An obstacle course with stairs, blocks, and turns
Robo Duel: One on one fighting match between ‘bots
Winners in all three categories will receive cash prizes & trophies!
Full rules and registration details available at our website. If you
have any questions about the event please email
tonyo@hitecrcd.com or go to http://www.hitecrobotics.com
SERVO 03.2008 61