I am using the arduino library. All works well, but here is my application.
I want to use Pixy to inspect a part. I have a push button that is triggered while I inspect, and I DONT want to inspect while I am not pushing the button.
So I came up with:
do
{
pixy.ccc.getBlocks();
if (pixy.ccc.numBlocks )
{
Serial.print("Detected ");
Serial.println(pixy.ccc.numBlocks);
digitalWrite(K1_Pin, 0);
}
else
digitalWrite(K1_Pin, 1);
}
while (digitalRead (Trig_Pin)==0); // button pushed
I discovered that Pixi will send me blocks wheder the button is pushed or not.
Is there a command to “Stop Getting Blocks”?
Thanks
Mitch