← All exercises

Flasher

easy

Flash the output at 1 Hz (1 second on, 1 second off) while enable is high.

What it teaches

Blink an output 1 second on and 1 second off while enable is high. When enable drops, the output stops cleanly mid-cycle. The pattern behind every status-indicator light and 'check engine' blinker.

Inputs and outputs

TagTypeDefaultDescription
In_EnableBOOLEnable signal
Out_FlashBOOLFlashing output

Required behavior

  • Out_Flash is 0 when In_Enable is 0.
  • When In_Enable is 1, Out_Flash cycles 1 second ON and 1 second OFF, repeating indefinitely.