Build one yourself with this code
A machine I made with epoxy that automatically sorts Skittles, m&ms, and Reese's Pieces by color. It uses a a BASIC Stamp2 micro controller. Some pictures during construction are included as well as the source code and a pdf with a parts list and building instructions in case you'd like to make your own version.
Skittles Sorting Machine
Build one yourself with this pdf