Write BoneScript firmware to emulate a traffic light controller. You need three LEDs (red, yellow...
60.1K
Verified Solution
Link Copied!
Question
Accounting
Write BoneScript firmware to emulate a traffic light controller. You need three LEDs (red, yellow and green) for the traffic light, a 7-segment LED display for the pedestrian signal light and a pushbutton. Construct the circuit on a breadboard and run your program using Cloud9.
The correct sequence for traffic lights should be correctly emulated: RED GREEN YELLOW RED. Each LED should remain on for approximately 1 second. The pedestrian signal light should be off. If the pushbutton is pressed, then the following rules must be followed: Wait until Traffic Light == RED Traffic Light must stay RED Pedestrian Light counts down from 9 to 0 every second. It turns off after reaching 0. Wait for 1 second. Traffic Light = GREEN (normal sequence resumes)
All that is needed is help with the button pushing code, to stop the red light for the pedestrian crosswalk for 9 seconds.
Answer & Explanation
Solved by verified expert
Get Answers to Unlimited Questions
Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!
Membership Benefits:
Unlimited Question Access with detailed Answers
Zin AI - 3 Million Words
10 Dall-E 3 Images
20 Plot Generations
Conversation with Dialogue Memory
No Ads, Ever!
Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!