I used an Adafruit RFID reader to detect RFID tags embedded in the wiffle balls: the balls are cut slightly, enough to slip in an RFID tag; when the ball drops it rolls down an incline and passes the RFID reader, which reads the tag and initiates the Arduino’s feeding program. The Arduino switches on the relay that closes the feeder’s power circuit, and voila, food.