Yeah but are there other, sensor based approaches that would also work? Ripe berries are softer, so sonic/ultrasonic waves would propagate differently. Is there a wavelength of light which behaves differently? Can shaking the branch and observing the motion of the berry provide a clue?