How to use Pixy over I2C?

Hello! I need to write code to use a Pixy over the I2C interface to get, for now, the X, Y, and Size of an object. We’ve been using just Analog-Digital for awhile, but need to track multiple objects now. I’ve looked at some code from other teams, but can’t entirely seem to figure out how I should be doing this. Any help would be greatly appreciated!

I’ve never used the pixy before, but there seems to be a number of posts and github programming examples available.

FRC2876 - 2017 code

FRC2363 - 2017 Code

CD Post w/ useful links:

  1. You will need to make a cable. Our team got these from Amazon.

  2. Cut the end of one of the connectors and follow the chart here. Just make sure that the end you are starting with has the red stripe (or whatever color you plan on using) as 1. Otherwise prepare to be very confused.

  3. Follow the lines and see which ones need to go to the roborio’s i2c. You can leave out the 3v port on the roborio, we chose to power the pixy from the VRM. You can find a pinout for that if you arent doing so already.

  4. Once you are done with that, just put it in a 4 pin housing and it should work.

I also have code on my github.
If you need any help, let me know. I write things in a confusing manner