<< 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
Pectoris

Hello Pectoris,
Be sure to follow this guide:

https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:building_the_libpixyusb_example_on_linux

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?

Edward

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
Pectoris

1 Like