Best way to tell if a lid is open.

Alarm boxes use a standard little push switch ( liek on the arduino board) with a spring attached . the spring makes sure the switch closes correctly without having to have very tight tollerance.

Rob