My basic question is when the Pixy runs the Pan/Tilt program instead of the default, is there any way of pulling from the pins whether or not the pixy sees the object? I want the pixy to handle the PD and gimbal control and simply tell my microcontroller if it sees the object at all.
The above is the TL;DR ^, below is just some context.
To give a little more context (because I’m always open to ideas), I’m using a propeller board instead of an arduino, and although I’ve managed to get the two communicating over SPI, it seems as thought my ability to reliably see the object is finicky. Part of the reason it is or isn’t able to see blocks depends on the loop time, and each loop iteration sometimes takes vastly different amounts of time to run (between 10-35ms, even though it should not be able to run faster than 20ms (50Hz)). If I run each loop using a “pause(15);” at the end, it seems to work better than if I use “pause(20);” or any other time that I’ve tried for that matter - faster or slower! If I use an empty while loop at the end of each main loop iteration to wait until 20ms has passed, it works even worse.
Furthermore, I have to dedicate resources (an extra cog and pins) on the propeller chip that I would prefer to just have the pixy handle and therefore not bog down my microcontroller.
Any insights as to how I can pull whether the object is seen mid pan tilt program run or as to why my acquisition of the object location is unreliable would be greatly appreciated.