In this lab, we were challenged to build a fully-functioning elevator with three floors. It needed to be able to be summoned from each floor, return to the ground level after a period of inactivity, and have an override switch to bring the car back down to the ground. It also needed to have LED lights to indicate which floor the elevator was currently stopped at.
We used a sonar to determine the height that the lift was at. Once it reached the height indicated by the button pressed, the motor stopped. The red light indicated that it was on the top floor, the yellow that it was on the second, and the green, visible in the front view, indicated that the lift was on the bottom floor. We had issues with our sonar reading correctly, and so we had to adjust its measurements and values for each day of coding. The coding was the most difficult part of the project. The code had to be clearly organized in order to tell exactly what function fell under which if statement. We ended up having if statements within if statements, and at one point, our font size was so small it could hardly be read.
In the end, however, we got the elevator to work. The little green things that served as our chocolate in the cookie topper lab were out passengers, and they could reach any floor at any time they wanted.