2. Homework #1ΒΆ

For all programming assignments, please turn in your code along with your solution. For all hardware assignments, please provide as much details on your implementation, along with a video of the final setup in action. Submissions should be made on Sakai, and must be in the form of a single PDF file that includes all descriptions/code, and a video file.

Problem 1

Write an OpenGL program to display a rotating pinwheel. The simplest implementation would use a 2D setup. Extra credit points can be earned by making use of texture maps on top of the pinwheel, making a 3D model that is more realistic, or attempting a more complex scene, such as a ferris wheel.

Problem 2

Implement a traffic light circuit using the Arduino board for two perpendicular lanes. This should make use of six LEDs (2 red, 2 blue, and 2 green), and two switches. Pressing a switch indicates that cars have been waiting in one lane, so the other lane (if green), should become yellow and then red. Vice-versa for the opposite situation. The circuit should enforce that only one lane stays green, and the other red, at all times.