Passing vectors from Pixy2 cam to R-pi

My team is looking at using the Pixy2 cam to perform some basic vision tasks, we have been looking at using a raspberry pi as a coprocessor to pass vector values to our Rio. We have been unsuccessful in finding any documentation on how to do so. Could someone please direct us in the right path?

We use Java and any code examples would be greatly appreciated.

Thank you in advance.

There is no doc on using pixy2 w/ raspberry PI (or arduino) probably because each team that does this rolls their own solution. There is no standard way that I know of. You’ll have to figure out how to connect the pi to rio and come up with a communication protocol. Maybe some team using this method will post a link to their code. Until then using search is helpful:
A result on first page seems promising:
Try different search parameters, maybe pixy2 instead of pixy, try adding raspberry pi or arduino.

Searching on CD gets better results if you look for arduino instead of raspberry pi:

You can also avoid using a coprocessor and connect pixy2 directly to roborio(spi, i2c, analog). There are many teams(mine included) that have ported parts of the pixy2 protocol to java. One team has also cross-compiled the libpixyusb libarary to roborio. So you do have other choices if you can’t figure out the coprocessor way.

Good luck.

1 Like

Thank you for your help. Best of luck to you and your team.

Pixy2JavaAPI has been working very well for us over the roboRIO’s on-board SPI (no Raspberry Pi required).

Hey, we tried to use Pixy2 over SPI but ran into some problems. We are trying to run some line tracking code but everytime we run the getMainFeatures method, the robot code just crashes without exceptions. I wonder if you guys know anything about that? Another question I have is on the interfaces for Pixy, do you guys use SPI with SS? Thank you

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.