Sorting candy by color is a classic problem that has its roots in the contract riders of rock stars who were just trying to make sure that more important contractual obligations were not being overlooked by concert venues. Through the years, candy sorting has become a classic problem for hobbyists to solve in various ways. After a false start a few years back, [little french kev] was compelled to dust off those plans and make the most compact sorter possible.
This minimalist beauty uses an Arduino Nano and RGB sensor to assess the color. At the top, a small servo rotates an arm inside the hopper that both shakes the Skittles and sets them up single file before the sensor. Another small servo spins the tube rack around to catch the rainbow. There’s an RGB LED in the base that bathes the tube from below in light that matches the Skittles. Check out the series of gifs on [little french kev]’s personal project site that show how each part works, and then watch the build video after the break.
Did you know you can roll your own color sensor from an RGB LED and a photocell? If you don’t think candy is so dandy, you could always color-sort your LEGO.