← All exercises

Lamp Follow

easy

Turn on a lamp while a push button is pressed and off when released.

What it teaches

Copy the input straight to the output. When the button is on, the lamp is on; when the button is off, the lamp is off. The simplest pattern — no memory, no timing.

Inputs and outputs

TagTypeDefaultDescription
In_ButtonBOOLPush button input
Out_LampBOOLLamp drive signal

Required behavior

  • Lamp output mirrors the push button input every scan.