#158Premium
Raspberry Pi Pico Traffic Light with 4-Mode Button Selector (State Machine, GP11-13 + GP4)
4 different traffic light modes with just 1 button! 🚦 The mode changes with each press of the button: **Normal cycle** (red → yellow → green in sequence), **Red Only** (stop signal), **Yellow Flash** (caution/night mode), **Off** (maintenance). Concepts: **state machine** (the `mode` variable determines which behavior runs), **modulo mode cycling** (`(mode + 1) % 4` → 0→1→2→3→0 infinite loop), **non-blocking timing** (`time.ticks_ms()` + `ticks_diff()` instead of `time.sleep()` — the code does n
0.0(0)

