The purpose of this lab was to design a machine that would feed "Cookies" (wheels, in this case) and drop "chocolate" (little green connector things; we aren't sure of the name) onto the cookies. The hardest part was designing a system to feed the cookies onto a conveyor belt, as the cookies got stuck on one another. In the end, we set them on a ramp and used a rubber gear to feed the cookies on the belt.
Though not visible in the above images, two lights (one red and one green) are located in the middle. The red light is on while the belt is stationary, while the green is on while the machine is operating. The program starts when the bump switch is pressed, starting both the motor that drives the conveyor belt and the motor that feeds the cookies. Once a cookie is within 137 mm of the sonar, the belt stops and chocolate is dropped, utilizing another motor. The belt moves on, and the process starts over again. The hardest part of programming the robot was setting the correct distance for the sonar, as if the distance was too short, the chocolate would miss the cookie, but if it was too long, the chocolate would drop just because the belt moved.