Ever approached an intersection just as the traffic light turned green, making you wonder whether it somehow knew you were coming? Or noticed that some lights seem to stay green when you're approaching, while others turn red before you even reach them? It's not your imagination.
Some modern traffic signals use sensors, cameras, and sophisticated traffic-management systems to detect vehicles and adjust their timing based on what's happening on the road. Not every traffic light works this way, though. Some still operate on fixed schedules, while others can detect approaching vehicles, estimate traffic volumes, and coordinate with neighboring intersections.