Making a door open with a switch

And finally this bit is telling the door to open or close on the button press: