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!
You will need to make a cable. Our team got these from Amazon.
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.
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.
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