Hi there,
I have recently started working with pixy through my Arduino. I am trying to get pixy to print only the x and y coordinates that are in a boundary.
Here is what I have so far;
#include <Wire.h>
#include <SPI.h>
#include <Pixy.h>
Pixy pixy;
void setup()
{
Serial.begin(9600);
pixy.init();
}
void loop()
{
if(pixy.getBlocks())
{
if(pixy.blocks[0].signature == 1);
int x=55;
for(x=50; x<100; x++){
Serial.print(pixy.blocks[0].x);
Serial.print("\t");
}
}
}
--------- But it prints all the coordinates for x no matter what.
Any suggestions?
Best,
Kash