N/South Traffic lights with two pedestrian buttons using millis()

You might like to learn state machines. They help simplify the code from a number of interacting logical variables (SredLightOn, ...) into a structure of mutually exclusive states (enum {ALL_RED, NorthGreen, NorthYellow, SouthGreen, SouthYellow,...}) that helps manage lots of the conditional logic.

or