Can pixy cam measure a distance between it and an object

Added by duue znd 24 days ago

It is my third year in high school, and I have as a project for the end of the year the programming of a robot. Among my various problematics, I have to make sure that the robot goes from one point to another . To be done I decided to use a Camera Pixy .
the process is organized as foolows, There will be different objects (kind of checkpoints) that the robot will detect and with which it can move.But where I cannot manage is at the Arduino program level :( :'(.
The only programs I've found allow the Pixy camera to detect only one object and track it, but I want the camera to detect an object (for X distance), then another object .
How can I insert in the arduino program the distance knowing that the functions :

don't work on my robot (I don't know why)
for example :
if (pixy.blocks[i].y < 80) {
that doesn't work (also for "width" and "height") but it works for "x"

thank you in advance.

Replies (1)