Hooking up Pixy to a Microcontroller like an Arduino

Version 2 (Rich LeGrand, 02/18/2014 12:43 pm)

1 1 Rich LeGrand
h1. Hooking up Pixy to a Microcontroller like an Arduino
2 1 Rich LeGrand
3 1 Rich LeGrand
Pixy is meant to hook up to an microcontroller, and Pixy comes out of the box ready to talk to an Arduino.  Just use the supplied Arduino cable to connect Pixy to your Arduino.  
4 1 Rich LeGrand
5 1 Rich LeGrand
**
6 1 Rich LeGrand
7 1 Rich LeGrand
Now import the Pixy library ** by selecting Sketch->Import Library... in the Arduino IDE, and then browsing to the Pixy.zip file.  
8 1 Rich LeGrand
9 1 Rich LeGrand
Next, load the "hello_world" example by selecting it in File->Examples->Pixy.  Upload it and bring up the Serial Monitor.  You should see messages printed that look similar to this:
10 1 Rich LeGrand
11 2 Rich LeGrand
<pre>
12 1 Rich LeGrand
Detected 1:
13 1 Rich LeGrand
  block 0: sig: 1 x: 159 y: 109 width: 61 height: 61
14 1 Rich LeGrand
Detected 1:
15 1 Rich LeGrand
  block 0: sig: 1 x: 173 y: 114 width: 60 height: 61
16 1 Rich LeGrand
Detected 1:
17 1 Rich LeGrand
  block 0: sig: 1 x: 146 y: 111 width: 70 height: 65
18 1 Rich LeGrand
Detected 1:
19 1 Rich LeGrand
  block 0: sig: 1 x: 149 y: 104 width: 69 height: 64
20 2 Rich LeGrand
</pre>