<< return to Pixycam.com

Getting a specific signature from Pixy using Python

I am trying to use the Pixy to control a robot I built to play checkers. Problem is there are 24 pieces on the board, but I can only return 18 of them (know problem Numbers of Blocks Displayed on Serial Monitor Differs from PixyMon).
In the link above I saw that in C you can call getBlocks with a signature as a param, unfortunately it doesn’t look like they extended this to Python.
Long story short, I am trying to get the 2 colors independently now, but have had little luck. Any suggestions?

Hello Micah,
It does look like the Python API left out the signature argument for some odd reason. Sorry about that – I’ve contacted our developer to look into this.

In the meantime, the libpixyusb2 API and interface should work for you if you split up the calls.

https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:building_the_libpixyusb_example_on_linux

You know, another option for detecting checkers pieces is to use the getRGB function:

https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:video_api

This assumes that the pieces will always be in the same location in the image though.

Edward