<< return to Pixycam.com

Communicating with Pixy2 though USB with a Raspberry PI using C++


Hello Pixy team.

I am doing a project on a Raspberry PI where I would like to use the output of a Pixy2 camera to position an arm to scan and pick up objects.
the project is written in C++ on a Raspberry PI and I have not been able to find any examples other than the ones using arduino and python.

So I was wondering if it is just me that cant find them?
As trying to use the libpixyusb2 library have until now given me a quite a few compile errors, that I have not been able to solve, and the other option is to use a python script for it and send the data to C++ which I would like to avoid.

Best regards


Hello Pectoris,
Be sure to follow this guide:


and be sure to install the libraries as described in the guide, such as libusb, noting any installation errors you may encounter.

If this doesn’t help, what are compile errors you are getting?



Hello Edward

Thank you for your replay, most of it was because i didn’t put -lusb-1.0 when I included libpixy2.a, and to be honest I have forgotten the reset, got it to work now though.

Again thank you for your replay.

Best regards