a real programming for a real traffic lights.
attrezzaggio
pin1 
_green1
pin2 
_green2
pin3˜ 
_yellow1
pin4 
_yellow2
pin5˜ 
_red1
pin6˜ 
_red2
variabili
ciclo
annotation: first traffic lights
SWITCH ON (5 Volt)
_green1
SWITCH OFF (0 Volt)
_yellow1
SWITCH OFF (0 Volt)
_red1
annotation: second traffic lights
SWITCH OFF (0 Volt)
_green2
SWITCH OFF (0 Volt)
_yellow2
SWITCH ON (5 Volt)
_red2

wait
5000 milliseconds
annotation: yellow on the first
SWITCH ON (5 Volt)
_yellow1

wait
1000 milliseconds
annotation: now red on the first, green on the second
SWITCH OFF (0 Volt)
_green1
SWITCH OFF (0 Volt)
_yellow1
SWITCH ON (5 Volt)
_red1
SWITCH ON (5 Volt)
_green2
SWITCH OFF (0 Volt)
_yellow2
SWITCH OFF (0 Volt)
_red2
annotation: 10 seconds because this is main road

wait
10000 milliseconds
annotation: yellow to the second
SWITCH ON (5 Volt)
_yellow2

wait
1000 milliseconds