system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: Ok, what does that pedestrian crossing button really do ?
gpt
It tells the PLC that controls the traffic lights in the intersection that there is someone at the crossing that wants to get across.

Cars are identified with magnetic sensors. I.e, when enough metal is on the road at the same time, the PLC knows that there is a car in a lane.

In it's most simple form, there is a detection coil right next to the stop line. So that cars that have stopped are properly identified. In more advanced setups, there are coils that identity cars from a distance so that they don't necessarily have to stop. Or speed down. Or to better be able to count cars. Establish that an off ramp is getting full and need to be cleared. And there can be coils that identify trucks from afar so that the intersection is not forcing them to pull the brakes in a manner that they are not necessarily capable of anyway. Or coils that enforce the bus lane by not even reacting to cars.

So, what does that have to do with the pedestrian button?

Well. The detectors makes the intersection adapt to traffic. A lane won't have a green unless there is actually a car to let through. And if there is a green, it can be a short one intended to let just the one car out.

But. Pedestrians are not nearly as fast as cars. The button is there not only to tell the PLC that there is a pedestrian. But to *make sure that the pedestrian has plenty of time to pass safely.* In other words, it creates a safe window in the program that is far too long for cars, so that it never makes sense to keep it going all the time, and shuts it once the timer runs out.

Some intersections have bike crossings too. Those buttons trigger their own timer too. Often shorter than the pedestrian button, because the bicycle crosses faster.