■ FIGURE 7
Download the project code
(which bundles everything discussed
here into a reusable object) and have
a look at the rest. You'll see that I've
also added methods to set the
position and move the speed of all
the servos with a single call. Another
method allows us to wait until a
specific servo channel reaches its
intended target.
For me, anyway, this is just a
start. Having the ability to create
servo pulses with 1 µS resolution and
enough time between servo pulses to
add speed control features using high
level code (Spin) means that the
Propeller is likely to become a very
serious player in the servo control
arena — especially for those projects
that have available I/O. For those of
you that don't want to roll your own
hardware but would like a custom
servo controller, you can always get a
Propeller PSC from Parallax and
reprogram it. With the code we've
developed here, you're well on your
way. Here's a hint for controlling the
other eight outputs on the PPSC:
Each cog has two counters. Use the
second counter to generate pulses
for the second set of eight outputs.
This keeps the servo pulse generation
in a single cog.
Arduino. It's
understandable.
The marketing
machine behind
the Arduino is
doing a great
job, and I
designed the
Propeller
platform to be
stackable like the
Arduino.
When I told
him about the
Propeller, he was
interested but not enough to give up
his investment in Arduino "shields."
Well, good news: You can use those
shields with the Propeller — the
Propeller ASC (Arduino Shield
Compatible) from MGH Designs, that
is. As you'd expect, the Propeller ASC
is a small board, the same size and
layout (including the odd header
spacing) as a traditional Arduino. An
on-board ADC handles the analog
input pins.
I have nothing against the
Arduino but having worked with one,
I find the Propeller easier to program
and far more powerful. If you're an
Arduino user that's been wanting to
give the Propeller a go, now you can.
I'm pretty certain you'll be happy for
doing it.
Until next time, keep spinning
and winning with the Propeller! NV
GOOD NEWS FOR
ARDUINO FANS
While working on a lighting
project in a Hollywood prop shop,
I was approached by a member of
the crew who asked if the Propeller
platform I was using was an
JON “JONNYMAC”
WILLIAMS
jwilliams@efx-tek.com
PARALLAX, INC.
www.parallax.com
GADGET GANGSTER
Propeller platform kits
and accessories
www.gadgetgangster.com
MGH DESIGNS
Propeller ASC
www.mghdesigns.com
18
September 2011