← All exercises

Two-Button Lamp

easy

Turns on a lamp only when both push buttons are pressed simultaneously.

What it teaches

Turn on the lamp only when both buttons are pressed at the same time. The 'two-hand safety' interlock on industrial presses uses the same idea.

Inputs and outputs

TagTypeDefaultDescription
In_Button1BOOLFirst push button
In_Button2BOOLSecond push button
Out_LampBOOLLamp drive signal

Required behavior