The final assignment in one of my introduction to engineering classes was to build a 'useful' arduino based robot. The definition of it's usefulness was pretty loose...
The robot was a tiered box made of cardboard, hot glue, laser cut, and 3D printed parts. I used an arduino RGB sensor to determine the color of the skittle. One motor rotated the Skittle first from the hopper to the color sensor, and then into position to drop it down the chute. The second motor rotated the chute into the right location for the corresponding color, and deposited the Skittle in a cup.
The most challenging part was tuning the RGB values that corresponded with each color of candy. I found that the values for a red Skittle were similar to those of a purple Skittle, and the robot would sometimes get the color wrong. The solution to this problem was blocking out ambient light.
My team took first place in the end of semester competition, as voted on by college faculty and 3M engineers. I had a ton of fun with my team.
Here I am showing our robot to a local newspaper reporter: