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.
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: https://github.com/search?l=Java&q=pixy&type=Repositories
A result on first page seems promising: https://github.com/FRC5188/ArduinoPixyAndRoboRIO
Try different search parameters, maybe pixy2 instead of pixy, try adding raspberry pi or arduino.
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.
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