Rather than using a breakbeam sensor, we rigged up an IR rangefinder instead. The voltage it returns increases as an object moves closer to the rangefinder. So with it mounted in a fixed position in our frame, there's a baseline value that the voltage is steady at when there is no ball in position. When a ball enters the frame perimeter, the voltage spikes up (well alright, it increases by less than half a volt

). So the code just compares the reading every cycle to the reading taken upon initialization and when it increases enough, alerts the driver that a ball is in place through the dashboard (still getting this to work), or allows the bot to know when to kick in autonomous.