Due to time constraints, I had to go with the pedestrian crossing idea.
Below is a video of the Arduino working, as you can see I couldn’t get my hands on a green light, so I had to make do with blue lights, which works just as well.
Below is a full view of the circuitry, it is a fairly simple design, however, I found it still works quite well. Unfortunately, I couldn’t find a smaller breadboard to fit it all on so I had to make do with a full sized one.
When the button is pressed the red lights will change slowly to yellow, then after a few seconds the blue lights will flash up telling the hypothetical pedestrians to cross over. The board will then reset to red until the button is pressed again.
Below is the start of the code, it has more parts than the simple traffic light system, however, the principle is the same, all that needed to be done was to state what number goes to what colour LED and what number goes to the button.
Here I added the setup functions, where the red yellow and green(blue) lights are configured to outputs.
Below is the void loop, it details when it will change the lights and at what condition it has to be in, in this case, you can see how it changes from the button press to the lights flickering.
Below the void loop is where it details the delay time between each light change, and what light comes on after the one before.
For this particular project, I followed this video on how to make it step by step including the code and wiring.