Hi All,
I have a problem with the Arduino missing objects.
My Pixy is directed at a white panel with 4 colored squares, to which it has been trained. Pixymon shows 4 objects being tracked. My Uno Serial Monitor suggests 4 objects are being tracked on the first loop pass, then either 1 or 2 objects on subsequent passes.
Conspicuously, if there is only 1 block found, it is always the signature 1 block; 2 blocks are always signatures 1 and 2. This is true even if I set the signatures to different colors.
Any ideas what’s going on?
Thanks,
Tom
Code:
//
#include <SPI.h>
#include <Pixy.h>
Pixy pixy;
void setup()
{
Serial.begin(9600);
Serial.print(“Starting…\n”);
pixy.init();
}
void loop()
{
int i = 0;
uint16_t blocks;
blocks = pixy.getBlocks();
if (blocks>0)
{
Serial.print("\t blocks = “);
Serial.print(blocks);
for (i=0; i < blocks; i++) {
Serial.print(”\t signature[");
Serial.print(i);
Serial.print("] ");
Serial.print(pixy.blocks[i].signature);
}
Serial.println();
}
delay(100);
}
//