ActivityBot 360° and Pixy2 for Color Object Tracking

What it’s about

The Pixy2 CMUcam can be trained to identify objects by their colors and send their locations and sizes to the ActivityBot 360. This step-by-step tutorial shows how to make the ActivityBot 360° use the data it receives from the Pixy2 to find objects of certain colors and track them in BlocklyProp. Code examples in C and Spin are also available on the Pixy2 product page under "downloads".   

IMPORTANT: Follow each step; don’t skip any. You’ll have to carefully follow all the steps in this tutorial for this robot color tracking application to work.  Then, you’ll see a totally new personality in your robot and be very proud of the results!

Before you start

You will need:

You should have completed:

Pixy Power from USB or Propeller Activity Board, not Both! 

It’s OK to use either power setup (A) or (B) shown below, but do not connect both at the same time.  For more info, see Make the Pixy2 Connections. 

Power Supply Setup (A)

Pixy2 Power Supply with USB

In Power Supply Setup (A), Pixy2 is powered through USB during configuration. Ground, Sin and Sout are connected to Propeller Activity Board. The Pixy2's power cable is not connected to the Propeller Activity Board WX 5V supply. 

Power Supply Setup (B)

In Power Supply Setup (B), the USB cable is removed. The Pixy2's Ground (Vss), Sin and Sout are connected to Propeller Activity Board. The Pixy2's power cable is connected to the Propeller Activity Board WX 5V supply. Pixy2 is powered through the Propeller Activity Board’s 5V connection. The Propeller Activity Board WX must be in switch position 2 for this arrangement (position 2 provides power to the servo header 5V ports). You may also use switch position 1 if you connect the Pixy2 5V header above the breadboard.