Here's Brian Egenriether's new-and-improved Skittles sorting machine. It's interesting to note that he used machinable epoxy for the parts instead of using a 3D printer. I know 3D printing is the future, but the current crop of home 3D printers make ugly parts. Subtractive fabrication technology makes better looking stuff, at least for now.
This machine sorts Skittles, m&m's and similar candies by color. It is the 3rd revision of the original machine. The inside is now complete and features user-selectable inputs to choose which type of candy to sort. Types not shown include Reese's Pieces and other types of Skittles.
The microcontroller is a BASIC Stamp 2 and the color sensor is made by TAOS. I made most of the parts by hand from a machinable epoxy including the outer case, inner housing, hopper mechanism, 5 way chute, and the the rotating disk inside. The other parts include a piece of PVC, ceramic bowls, telescope parts, wood for the base, and the funnel which was cut from a hummingbird feeder.