<< return to Pixycam.com

Pixy Cam doesn't work with Servos or the Arduino Uno

Hi everyone.
I am new to Arduino and the Pixy cam. I cannot get the pixy servos to work with the pixy cam and the connection between the pixy cam and my Arduino board do not work. I am using the cable that came with my camera. Any thoughts? I tried looking for a phone number for charmed labs but no success. Thanks

This is a sample code that I tried running

#include <SPI.h>
#include <Pixy.h>

Pixy pixy;

void setup(){
Serial.begin(9600);
pixy.init();
}

void loop(){
if (pixy.getBlocks()){
if (pixy.blocks[0].signature == 1);{
Serial.print(pixy.blocks[0].x);
Serial.print("\t");
Serial.print(pixy.blocks[0].y);
}
}
}

Hello Nick,
Let’s first get your Pixy talking to your Arduino. Have you tried running the hello_world example? There is how-to information here:

http://cmucam.org/projects/cmucam5/wiki/Hooking_up_Pixy_to_a_Microcontroller_(like_an_Arduino)

If you’ve done these steps and are still having problems with your Pixy talking to your Arduino, please go through this debugging guide:

http://cmucam.org/projects/cmucam5/wiki/My_Arduino_isn’t_receiving_data_from_Pixy

Let me know what you find. Once your Arduino and Pixy are talking, then we can work on your servo issues.

Edward