CommandScheduler loop overrun error on PixyCam block counter

Hi everyone,

We are working on object detection using a Pixy camera and trying to display the number of detected objects on the dashboard. For this purpose, we are using Pixy’s official Java API. Specifically, we are using the following function:

pixy.getCCC().getBlocks();

However, when we add this value to the dashboard, we encounter a CommandScheduler loop overrun error.

If anyone has experience with Pixy’s Java API or has faced a similar issue, your suggestions would be greatly appreciated. Any insights into the cause and resolution of this error would be helpful.

Thanks in advance!

2 Likes

From the Pixy documentation

Setting wait to false causes getBlocks() to return immediately if no new data is available (polling mode). Setting wait to true (default) causes getBlocks() to block (wait) until the next frame of block data is available. Note, there may be no block data if no objects have been detected.

2 Likes

It worked, thank you

3 Likes