<< return to Pixycam.com

robot servos won't work once pixy_init

added pixy to existing robot then servos (gripper and sweep) quit. No errors. Commented out pixy init and servos work. Is there a work around or a new driver.

Hello Joseph!
Im also using Pixy in a similar application. This could be a code issue.
If you are trying to access data from pixy, you need to check if the data is there before trying reading.
For example, if you are using an Arduino and if you want to get an x coordinate of certain color signature, it needs to be inside if(blocks){ }

Hi Joseph,

I’m assuming you’re using an Arduino with this robot? If so, the Pixy Arduino library may be taking over the pins that your servos use. You might want to check out which pins are used for which communication methods and see if they match up with the servos.

Scott

Thanks Scott, you are correct. I did some research to find that SPI uses pin 11,12 and 13. These are mapped to the ICSP connector on the UNO board that I’m using. That kind of info could have saved me a lot of time. I did have to move some digital I/O to analog pins A1,A2 and A3. These work as digital and I was not using them. It was not obvious since the Pixy cable plugs into the ICSP. Thanks for your help. Problem solved.