
Lesson 98-10: Arduino Traffic Light
In this lesson, we learn how to use an LED and push button in this 10-LED project. The wiring diagram is shown; the code is fully explained and demonstrated with multiple changes of settings for each project. We read the potentiometer's voltage and display the voltage by turning each LED on to represent the voltage. A simple traffic light project.
This code is part of a video lecture. This is project 10's code. We have three LEDs: red, green, and yellow.
We will set the time for each LED to be turned on. Of course, the timing can be changed, and in some countries, the sequence may vary; for example, yellow and green might be on at the same time for a short period. But this is a very simple, basic traffic light.
Comments will be displayed here.