Brian Egenriether invented and built a Skittles sorting machine, because he could. It determines the color of each candy and slots it into the appropriate bin.
It uses a BASIC Stamp 2 and 3 servos for actuation. An IR LED and phototransistor are used to stop the turnstile in position. I fabricated may of the parts from epoxy including the body, the turnstile, the chute header, etc. The base is wood and the funnel is from a hummingbird feeder. The rest is made from telescope parts and PVC.
So you are no longer bound to "taste the rainbow" if you really prefer just the yellow ones. -via Laughing Squid