<< return to Pixycam.com

trip relay on detecting signature 1

I am trying to use an arduino to trip a relay when the pixy detects signature 1.

I have as a test:

@if (blocks[j].signature == 1)
{
digitalWrite(led, HIGH);
}
else {
digitalWrite(led, LOW);
}@

I get the error:

invalid types ‘uint16_t {aka unsigned int}[int]’ for array subscript

I am new to this and not sure what to do. The wiki page says it is very easy to access the components of the blocks array, so I’m sure this is a beginners mistake.

Can someone point me in the right direction? Thanks.