Hi …
I registered in camera Pixy 3 colors … I want to use 2 or 1 colors each time … ( dénombrements)
So that I get a certain action each time Whenever 3 colors different are detected …
Save 3 colors in Camera Pixy è Pull 2 or 1 colors different è Action
pixy.blocks[j].print();
signature = (pixy.blocks[j].signature);
1 if (signature == 1)
{
digitalWrite(8,HIGH);
delay(1000);
}
2 else if (signature == 2 )
{
digitalWrite(7,HIGH);
delay(1000);
}
3 else if (signature == 3)
{
digitalWrite(6,HIGH);
delay(1000);
}
4 else if ((signature == 3)and (signature == 1))
{
digitalWrite(8,HIGH);digitalWrite(7,HIGH);
delay(1000);
}
5 else if ((signature == 3)and(signature == 2))
{
digitalWrite(6,HIGH);digitalWrite(7,HIGH);
delay(1000);
}
6 else if ((signature == 2)and(signature == 1))
{
digitalWrite(8,HIGH);digitalWrite(6,HIGH);
delay(1000);
}
Problem :::but in the 3rd, 4th and 5th condition if … the diode is not lit at the same time ???