Best way to tell if a lid is open.

Hall sensors are inexpensive now, so I'd use a Hall sensor and a magnet. Caution: some of them such as the US1881 turn on when they see a N pole and off when they see a S pole. This sort (bipolar) is ideal for rev counters, but not what you want for a proximity sensor (you need a unipolar one such as http://uk.rs-online.com/web/p/hall-effect-sensor-ics/7384743/).