PyRaspBeta

← All practice problems

Raspberry Pi practice problem · LEDs & PWM

Two-second glow

EasyBudget $2Python · gpiozero

Not every light blinks forever. An LED on GPIO17:

  • off from 0 to 1.0 s
  • on from 1.0 s to 3.0 s
  • then off for good (the program may keep running or end — either is fine)

Tip: sleep() from the time module waits; a gpiozero LED has .on() and .off().

More in LEDs & PWM