Project
PLC Light Game
Assignment Description
You were just hired by Ollie Corporation and on your first day they tell you that there is major company news. The major conglomerate Cockford International has just announced a buyout merger with your new company. This is good news because the combined company will have an 80% market share. The bad news is that Cockford has a large division that does nothing but the job Ollie had hired you to do. The hiring manager didn’t know that the merger was happening and tells you that you have nothing to worry about because he saw that you have PLC experience on your resume and the combined company is going to need a ton of experts in that area. He asked you to put together a demonstration that you can use to show off your skills.
You decide that you are going to make a simple game that shows your programming skills. To start the game, you will have to press a button to turn on the game mode and pressing the same button will stop the game. While the game is on, there will be a light on indicating that the game is currently being played. The person playing the game is instructed to press the green, black, and red buttons as many times as they like.
Unknown to the user, there will be a timer running that is resetting every 1 and 1/2 seconds. If the red button was pressed last before the timer expired, then a green light will be illuminated for 2 seconds. If the green button was pressed last before the timer expired then a yellow light will be illuminated for 2 1/4 seconds. If the black button was pressed last before the timer expired then a red light will be illuminated for 5 seconds.
The goal of the game is to have all three lights on at once. When the game is won, light a light to indicate that they have won and allow them to reset for another round.