My end project

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.

WP_20170607_004.jpg

WP_20170607_002.jpg

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.

Screen Shot 2017-06-08 at 10.05.20.png

Here I added the setup functions, where the red yellow and green(blue) lights are configured to outputs.

Screen Shot 2017-06-08 at 10.07.25.png

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.

Screen Shot 2017-06-08 at 10.07.30.png

Below the void loop is where it details the delay time between each light change, and what light comes on after the one before.

Screen Shot 2017-06-08 at 10.07.35.png

 

For this particular project, I followed this video on how to make it step by step including the code and wiring.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s