when the user presses a button, a cog will release a ball while a motor moves a basket back and forth. if the ball falls into a basket, the user gets a point. otherwise, the ball falls down to the conveyor belt and goes back to the top.
When working on this design, we had trouble with focusing on the scope of the project. While we had a variety of different ideas, we also had to consider the time constraints as well as the amount of programming that would be necessary to complete the project. After discussing the different features we wanted to include, we had to choose which ones would be implemented, which ones could be used later for the final sculpture, and which ideas weren't feasible.
For the color sensor to switch the balls' paths, the code is formatted in a while loop with "if, then" statements. The color sensor reads the sensor value and if the ball is green (value of 3), the motor flips the platform to the left. If the ball is pink (value of 6), the motor will turn and flip the platform/track switcher to the right.
Below to the left is our WM2D simulation of the pinball machine, and to the right is our real-life sculpture in the design studio.