Welcome back.
This time I will show the basics of how to connect a push button to the traffic light simulator circuit and how to read it from within an Arduino sketch. If you haven’t read parts 1, 2 and 3 yet, I recommend you do so first as it will make it easier to follow the examples.
For this demonstration, we’ll use a simple push button like this. They have four pins, connected together two by two. Usually the two pins on either side are connected together, and pushing the button will connect them to the two pins on the other side. If you’re in doubt, use a multimeter to check which pins are connected together.
Additional parts needed this time: