← All exercises

Lamp Inverted

easy

Controls a lamp to be the logical inverse of a push button.

What it teaches

Flip the input. When the button is on, the lamp is off; when the button is off, the lamp is on.

Inputs and outputs

TagTypeDefaultDescription
In_ButtonBOOLPush button input
Out_LampBOOLLamp drive signal

Required behavior

  • The lamp output is ON (1) when the push button input is OFF (0).
  • The lamp output is OFF (0) when the push button input is ON (1).