Traffic Lights for Smart Cities. How do they work?