I am trying to build a autonomous tennis ball picker upper, the robot would have a roller that pushes the ball to the inside
of the robot. I would like for the robot to somehow sense that the ball has actually entered and to keep count of
the balls on the inside. What can I use (sensor or anything) to sense the balls and keep count. The idea for the robot is to find a ball and collect it and then find another ball and keep doing this until it reaches a max of 3 or 4 balls. At that point the robot should go back to a base. I would like for the microcontroller to check the count from the sensor at the beginning of the loop to take decisions .....