PixyCam NI Code

PixyCam is a small camera with onboard color object detection. There are several ways to get the size and position of the object detected by it. The file below contains one VI to get shapes from a PixyCam on the RoboRIO within the FRC framework for LabVIEW using the SPI bus.

The VI has 2 loops, the top one get the content of the data for one frame, the second interprets those data and turns them into an array of clusters that contains the signature reference, location and size of the detected target.

To use, simply place it as an independent VI in the main.vi. The PixyCam needs to be wired to the SPI port and setup to use the SPI with CS protocol. Refer to the webpage linked above for details.
Use PixyMon to define the protocol and signatures.