Page 11 - Demo
P. 11
o Green = 5 seconds (Go)o Yellow = 2 seconds (Wait)4. This sequence repeats forever %u2192 simulating a traffic light. Expected Output / Learning Outcome LEDs turn ON in traffic light sequence: Red %u2192 Green %u2192 Yellow. Student learns:%u2022 Controlling multiple outputs in sequence.%u2022 Using timing logic to simulate real-world systems.%u2022 Importance of delays in automation. Practice Questions %u2013 Project 3 (Traffic Light Simulation) Multiple Choice Questions (MCQs)Q1. Which pin controls the Red LED in this project?a) Pin 8b) Pin 9c) Pin 10d) Pin 13Answer: a) Pin 8Q2. How long does the Yellow LED remain ON in the given code?a) 1 secondb) 2 secondsc) 5 secondsd) 10 secondsAnswer: b) 2 secondsQ3. In which order do the LEDs glow?a) Red %u2192 Yellow %u2192 Greenb) Yellow %u2192 Red %u2192 Greenc) Red %u2192 Green %u2192 Yellowd) Green %u2192 Yellow %u2192 RedAnswer: c) Red %u2192 Green %u2192 YellowQ4. Which function is responsible for introducing time gaps?a) pinMode()b) digitalWrite()c) delay()