subsystems complete, you can now move ahead with
programming your new robot. This requires — if you
haven’t done so already — first installing an integrated
development environment (IDE) for the Activity board
onto your PC. The steps are not complicated, and the
Parallax Learn site ( learn.parallax.com) has complete
instructions. I’ll provide a review of those steps here.
Note: If you have not yet installed the IDE and other
support software for your PAB, DO NOT plug the board
into your PC at this point. Nothing very serious will
happen, but your computer will look for special drivers
required for communicating with the PAB. Since you
have not installed the support software yet, these
drivers will not be found. Other drivers may be selected
instead, and this can cause operational issues for you
later on. So, be sure to plug in the PAB only after
installing the IDE.
Before getting into the nitty gritty, however, let’s
discuss was an IDE is and what it does. The integrated
development environment serves three main roles:
1. It provides an editor program for writing and
modifying your programs. Features of the editor
make it easy to create “projects” that comprise
multiple individual files.
2. It converts the human-readable programs you create
into something that the Propeller can understand.
This step is called compiling.
3. It uploads the compiled version of the program into
the Propeller. This step is traditionally done using a
standard USB cable between your PC and the PAB.
There are several variations available for the Propeller.
One is the Spin IDE, which uses the original Spin language
developed for the Propeller. Another is the SimpleIDE which
uses the C programming language. You are free to use
whichever one you want with the PAB, though the example
programs in this series all use C and the SimpleIDE.
Begin by downloading the latest SimpleIDE software
installer for your operating system. See the Sources box for
the download URL. (In case the URL changes, you can find
the new location by using the Search function on the
Parallax Learn site.) Select the operating system of your
choice (such as Windows) and download the installer
package to your computer.
Here’s where the instructions differ depending on your
OS. Let’s use Windows as an example. The SimpleIDE
installer is downloaded as an .exe program. Once
downloaded, run it — you may need administrator privileges
to complete this task. The Windows installer is actually two
parts — both automatic:
The first part installs the SimpleIDE program itself. The
second part installs the FTDI USB drivers, so that your
computer can communicate with the PAB via USB cable.
Once the software is installed, you can plug in the PAB
and turn it on by sliding the power switch to position 1.
WAIT until your computer announces successful installation
of the USB driver. You may receive several such notifications
as different segments of the drivers are installed.
With SimpleIDE installed, you may now run it. The first
time you start SimpleIDE, it will verify a location of the
workspace files. This is where examples are placed, and
where you’ll save the programs you create. On Windows,
the default location is My Documents\SimpleIDE.
As with all well-written programming suites, SimpleIDE
comes with a “Hello World” example program for testing
that everything is connected and working properly. The first
time SimpleIDE is run, a verification program such as
Welcome.c is automatically loaded for you. Feel free to try
1. Be sure the PAB is switched on, with its power
switch set to position 1.
2. Double-check that the COM port setting in the
SimpleIDE window matches the COM(munications)
port for the USB connection to your PAB. This
number will vary, depending on other USB-based
COM drivers you’ve installed. For me, the PAB
installed as COM7. For you, it’s likely to be some
other number. SimpleIDE will make an educated
guess as to the correct COM port if your PAB is
connected and turned on.
3. Find the Run with Terminal button on the toolbar.
This action: 1) complies the program; 2) uploads the
compiled code to the PAB; and 3) displays a special
Terminal window so that you can view messages
sent back from the board. Upon successful
completion of the program, the terminal will show
SERVO 10.2014 35
diagram for the
speaker. One lead
goes to GND, the
other to pin P4.