<< return to Pixycam.com

Counting Detected objects using Pixy2 and arduino

Hello, I just bought Pixy2 cam for our object detection project using it with Arduino, I’m having trouble counting the objects that pixy2 detects to print in our LCD can someone suggest a parameter to get how many objects does the pixy2 cam detecting and the object is not moving. For example i place 1 green ball and 1 blue ball it should return 2 objects detected.

You should try running the ccc_hello_world example:


Line 46 of the source code shows how you get the number of blocks (via pixy.ccc.numBlocks).