🚦 Traffic Light Controller

Moore Machine with timed transitions — 4-way intersection

Intersection View

North-South
East-West

State Diagram

S0 NS:R EW:G S1 NS:R EW:Y S2 NS:G EW:R S3 NS:Y EW:R timeout(30s) timeout(5s) timeout(30s) timeout(5s)
Moore Machine with Timer Input
This FSM uses timeout events as inputs. Each state has a fixed duration: Green = 30s, Yellow = 5s. The output (light colors) depends only on the current state.

Simulation

30
Seconds until transition
Simulation Speed: 1x
Current State
S0 — East-West has GREEN. North-South is RED.

State/Output Table

State N-S E-W Duration
S0
30s
S1
5s
S2
30s
S3
5s