M&M sorters come in lots of designed but as RML points out they all basically work the same way. The candies travel down a shoot, their color is determined by a sensor, and then an Arduino-powered servo motor to drop the candy in the right bin. Servo motors and the Arduino color sensor are both quite slow, so the inventor tries to improve these bottlenecks.
The components are replaced with an iPhone camera, to read the color of the candy, and an array of electromagnet-powered gates, which do the actual physical sorting.
But I don't stop the M&M for colour recognition. Instead I use an iPhone to capture the colour of the M&M as it is in freefall. As it is still falling the iPhone talks to a Bluetooth module attached to an Arduino and that fires off the correct electro magnet controlled gate. This sends the M&M into the correct pot. Even my rough prototype is reasonably fast because the colour recognition and path that the M&M takes down the chute is decided and determined whilst the M&M is moving under gravity.
In fairness, the prototype doesn't appear to sort that much faster than the machines we've seen before, but you have to admire the creativity of the design. With a little refinement, this machine could by the blazing glory of candy sorters. [Review My Life]