Summary
In this chapter, you learned how a candy dispenser works. Instead of cents, you used the property of a color sensor to dispense different amounts of candy based on distinct colors detected. You also learned how to build a simple dispensing mechanism using gears and other LEGO elements that can be effectively used for other applications as well. In the next chapter, you will be building an automatic color sorter using a conveyor belt. Again, this is an industrial application used widely for various tasks related to sorting. You will enhance your coding skills using a color sensor and add multiple conditions for the robot to check and act upon.