and tools often made the endeavor
prohibitively cumbersome. When companies like Apple,
RadioShack, and IBM started selling fully assembled
computers, hobbyists could finally turn their attention to
programming. Programming tools and better languages
and operating systems were some of the first advances
to aid the average user. This paradigm shift facilitated
the development of databases, spreadsheets, and
WYSIWYG (what you see if what you get) word
processors, and in the years that followed, programmers
created amazing applications that revolutionized the
entire computer industry.
You may wonder how all this relates to robotics. As
mentioned earlier, advances in and the availability of
both motor control and sensor technology have made
building robots easier than ever. Unfortunately, even
with these advances, there are still obstacles limiting the
transition to programming.
The languages available for most microcontrollers
are powerful tools in the hands of experienced
programmers. Nevertheless, the physical designs
associated with most microcontrollers (limited program
memory and data storage, and a lack of hardware
support for floating point variables, etc.) force the
languages used to program these microcontrollers to be
less than full-featured and often cryptic in nature. Such
languages are acceptable for programming simple
algorithms, but if complex behaviors and artificial
intelligence are to be achieved, more capable high-level
tools are needed.
Advances in and the availability of both motor
control and sensor technology have made
building robots easier than ever. Unfortunately,
even with these advances, there are still
obstacles limiting the transition to
One language that makes developing and
debugging behavioral algorithms easier and more
efficient is RobotBASIC (RB). Beginners can use its
pseudo-code like syntax to be productive in record time,
and more advanced users will enjoy the C-style syntax
options and the advanced functionalities that make it
easy to handle complex tasks. Refer to the sidebar for a
list of the highlights of this free language.
Since programs written in RB run on a PC (instead
of on a microcontroller) where there is plenty of
processing power and memory, users get the benefit of
unlimited multi-dimensional arrays, floating point
variables, and a plethora of unique commands and
functions that handle many tasks that are difficult — if not
impossible — to achieve in microcontroller languages.
When it comes to developing algorithms for robotic
behaviors, perhaps one of RobotBASIC’s most powerful
tools is an integrated robot simulator. While the two-dimensional simulated robot may not seem realistic at first,
the variety of sensors on the robot and the method with
Highlights of the
• No installation is required – you can run RobotBASIC from
a USB drive, a CD, or even from a web page.
• Use variable typing (integer, float, and string) OR totally untyped variables where ANY variable at ANY time can be
changed to ANY type by simply assigning it a new value.
• Standard GOSUB routines or callable function-like routines
(Call/Sub) with LOCAL variable scoping with by reference and
by value parameters (which may be skipped), as well as a
• Use legacy INPUT and PRINT statements for QUICK and EASY
I/O (great for introducing programming to non-programmers).
• GUI commands that create buttons, text boxes, edit boxes,
list boxes, dialog windows, message boxes, radio buttons,
check boxes, sliders, and more.
• Use a Procedural programming model with GOSUB and
CALL/SUB or an EVENT-DRIVEN approach with commands like
• Use standard BASIC syntax or a modified C-style syntax (e.g.,
++, +=, !=, &&). This can be great for teaching programming
fundamentals before moving on to more complex principles
• Increased productivity from numerous “helper functions” that
facilitate sorting, multimedia displays, flicker-free 2-D and 3-D
animation, robot vision (including web cam support),
extensive BMP image manipulation, matrix math, both high
and low-level file I/O, the ability to send emails (SMTP) and
communicate over the Internet (UDP and TCP protocols), and
• Develop and debug programs in an easy-to-use INTERPRETER-based IDE (Integrated Development Environment), then
COMPILE your programs to standalone EXEs for easy
• Ability to create includable LIBRARY files with #include (even
include binary files to protect your algorithms).
• An integrated robot simulator with numerous sensors such as
an electronic compass, ultrasonic distance measurement, IR
perimeter sensing, line sensors, a GPS, and more.
• Control real robots using parallel, serial, and USB ports for
wireless protocols such as Bluetooth and Zigbee.
• Unique proprietary protocol allows simulator programs
(without modification) to control real robots (see our books
and the HELP file for complete details).
• Direct support for the USBmicro U4x1 family of I/O modules
that provide 1-wire, SPI, and I2C serial control of digital
microdevices, as well as 16 lines of TTL I/O.
• Over 800 commands and functions often allow a few lines of
code to provide the functionality of hundreds of lines in many
• An extensive HELP file provides detailed information and
numerous programming examples.
• Web page tutorials, sample programs, and You Tube videos
provide free help if needed.
• Integrated editor with multiple file capability and color-coded
• RobotBASIC is FREE to schools, organizations, and
individuals — EVERYONE basically!
which they are used and programmed provide a realistic
life-like behavior. The robot has bumper sensors, perimeter
proximity sensors, line sensors, ranging sensors, a beacon
detector, an electronic compass, a battery-level sensor, and
a simple GPS system.
Debugging code on a real robot has always been
SERVO 01.2011 45