PyRasp

← All practice problems

Raspberry Pi Pico practice problem · Raspberry Pi Pico

Traffic light

EasyBudget $8MicroPython

A traffic light on GP13 (red), GP16 (green) and GP17 (amber — a yellow LED), repeating every 2.4 s:

  1. red on for 1.0 s
  2. green on for 1.0 s
  3. amber on for 0.4 s

Exactly one light is on at a time. All three LEDs and their resistors are wired in circuit.py.

More in Raspberry Pi Pico