<< return to Pixycam.com

Detecting the same object between 2 Pixys



My first Pixy2 is on its way. As I have no experience if this will work, I would appreciate any help.

I have two Arduinos, each connected to its own Pixy2. The Arduinos are spaced several hundred feet apart and are on a network.

I have an object moving between the two Pixys. When I detect an object (by its hue) in front of the first Pixy2, I want to capture it as a block.

I then want to transfer this same “block” to the second Arduino so that when it passes in front of the second Pixy2 , it is detected.

Can this be done? How can the “block” information be transferred?

Any help is appreciated and thanks in advance.


Hello Jimmie,
You said the two Arduinos are on some kind of network. I assume you could send the block information over the network(?) I’m probably not understanding your question.



Hello Edward:

Thank you very much for responding to my question. Yes, I plan to send the information via the network.

Because my camera has not arrived yet, I was just not sure if the internal block information can be extracted as I could not find it in the literature. Can you refer me to a link showing how the blocks can be retrieved?

If I may ask one more question in the scenario below:

Let us say the blue car in the attached image is traveling between the two pixycams. Can the second Pixycam recognize the car when it passes in front of it?

If yes, how can the first pixycam be trained to recognize the blue car given that it is not possible to stop the car in front of the camera so it can be trained …

Thanks again for your input.


Hi Jimmie,
Here is the API for the color-connected-components algorithm that might help:


this guide is a more general introduction for using with an Arduino:


Note that training is a manual task and either requires you to press Pixy’s button or select the object in the image. It isn’t something that can be done programatically, at least not without modifying some code. It sounds like you want to have one Pixy detect the car and then tell the 2nd Pixy where the car is so that it can be trained on the car. (?)