<< return to Pixycam.com

What is the parameter for Color Code(CC) on arduino?

Hello, im still in trouble finding the code for getting the Color Code(CC) on arduino
pixy.ccc.getBlocks();
if (pixy.ccc.blocks[1].m_signature == 1)
{
lcd.print(“Plastic Detected”);
lcd.setCursor(0,1);
lcd.print(“Press A to start”);
lcd.setCursor(0,2);
lcd.print(“5 mins”);
delay(2000);
lcd.clear();
}
this is the sample code from our project, the code will detect m.signature == 1 or the 1st signature that is trained in the pixy. what would i want to do is instead of signature 1 i want to call the Color Code that we trained. is it the same as m_signature or are there others parameter?

Hello,
It looks like you are trying to detect color code 34. Note that color codes are represented in octal numbers, so the “34” is an octal (base 8) number, which is 28 decimal (base 10). Try looking for m_signature==28 instead of m_signature==1. Hope this helps!

Edward