Your robotic problems solved here.
Post comments on this article at
a PIXY vision system camera.
For those who do not already
know, the PIXY is CMUcam’s newest
vision processing stand-alone camera.
Check it out at www.cmucam.org. I
have had CMUcams since the very
first one came out. I’ve liked their
work because they always made
versions on their software that ran on
Mac’s as well as Windows machines. I
also like them because they are
simple-to-interface vision systems.
Their latest — PIXY — is a whole
lot more powerful than that first
CMUcam! I will leave it to you to
check out their website for more
My project is to interface the PIXY
to my chipKIT Max32 board so my
robot can chase other robots around
an arena all by itself. In the great
tradition of programmers everywhere,
I searched the ‘net to find a project
someone else has already done.
Unfortunately, there do not appear to
be any projects that have successfully
interfaced a PIXY to a chipKIT Arduino
compatible board. Ah well, the joy is
in the journey, right?
The CMUcam folks have a demo
sketch that interfaces a PIXY to an
Arduino, so that is the place to start.
Rather than try to interface the
chipKIT to the PIXY and then try to
get the demo sketch working (having
two unknowns at the same time), I
will first get the PIXY working on an
Arduino by seeing colors it has been
trained to track.
There are three steps to take in
order to use the PIXY for vision based
1. Train PIXY to “see” the color you
are interested in tracking.
This is not very hard to do. In
fact, there are two ways to do it. The
first is to use the method shown on
the CMUcam website at
m5. This method uses the button on
the top of the PIXY camera board. To
train PIXY to track a color, hold the
button on the PIXY board down while
you hold the object whose color you
are tracking in front of the camera.
When the LED flashing on the bottom
of the board matches the color you
want to call this signature, let go of
the button. When the LED stops
flashing, push the button again and it
will store this color signature and
assign it to a signature ID.
The problem I had with this
procedure was that I could not
guarantee which signature ID the
color would be assigned to. The
advantage of this method, however, is
that your robot does not need to be
attached to a computer to learn. If
you want to track every color (up to
seven), then you don’t really care
which ID it gets.
I didn’t like the apparent
randomness of the signature ID
assignment, so I used another
method. This second method requires
you to use the (OS agnostic) program
pixymon, which is downloadable from
the CMUcam website.
2. Setting PIXY up to track colors.
Step 1: While running pixymon,
hold the color object in front of the
camera and select Action->Set
signature 1 (or 2, etc.). Use the
mouse to select a region on the
object to use as the color signature.
SERVO 07.2016 11
Figure 2. Assign signature ID. Figure 3. Give the signature a name.
Figure 1. Pixymon.