Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a code for Arduino Uno : Want to simulate a traffic light, using 3 LED's (R,Y,G) and one momentary pushbutton to simulate a pedestrian

Create a code for Arduino Uno: Want to simulate a traffic light, using 3 LED's (R,Y,G) and one momentary pushbutton to simulate a pedestrian wanting to cross the street. Control the LED's in the typical traffic light pattern, but let RED and GREEN stay on for just 30 sec and when using YELLOW, just have it on for 3 sec. When the program starts, start In RED, and for the normal pattern automatically, BUT when a pedestrian hits the pushbutton:

a. If the button is pushed when you are RED, then make sure the pedestrian has 15 sec to walk across before turning GREEN.

b. If the button is pushed when you are GREEN, wait 5 sec and then do your YELLOW and RED.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Banking Reforms And Monetary Policy In The Peoples Republic Of China

Authors: Yong Guo

1st Edition

1403900787,1403914540

More Books

Students also viewed these Finance questions

Question

Do Problem 11.5 with ammonia as the working fluid.

Answered: 1 week ago