<< return to Pixycam.com

How to use Pixy to follow a ball

If l want my robot to follow a colored ball (blue or red) , if l move the ball, can my robot follow the ball? How to do this , l am doing with FRC version of Pixy.

Any reply is appreciated!

Pixy can track the ball. If your robot can move, it should be able to follow the ball. :slight_smile:

Are you using an FRC controller, RoboRIO?

This page has some good info about a robot that can chase a ball:


Hope this helps.


Yes ,we use Roborio

It seems that this docs only tells me how to make a robot with Pixy. Is there any other docs for programming a ball tracking robot ?

Hi, these are the Pixy forums so we’d be happy to answer questions about Pixy.

You might be interested in the RoboRIO wiki page: https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:hooking_up_pixy2_to_roborio

The first two links are to projects that can help connect Pixy to RoboRIO.

Hope this helps!


Thanks , but it seems that the ball chasing project doesn’t support FRC Roborio. There is no example in this link. l am very puzzled.

We don’t have a ball chasing example that works as-is on the RoboRio. Sorry :frowning: The ball chasing demo in the Arduino library can hopefully serve as a starting point.


Is the problem of the pixy camera or the problem of the lib of FRC?

I don’t think there are any problems other than it hasn’t been written yet. I think the challenge with the roborio is picking a standard mobile platform that the demo can run on. You can’t put a roborio on a Zumo :slight_smile:


Yeah, but we want to use it on an FRC robot and a roborio is a must need.

So , it’s the problem of the lib. Maybe copy it from the arduino lib and adapt it to Java can solve this problem?

Maybe copy it from the arduino lib and adapt it to Java can solve this problem?

Yes, I think Edge is suggesting that you try to port the ball chasing demo code to Java, using the Arduino example as a starting point.