Hacker News new | ask | show | jobs
by twoflower9 2360 days ago
With the wardrobe light I'd prefer something simple like a relay that closes the circuit when the door is closed. Invert that signal with a transistor and buddabing buddaboom. Seems like more can go wrong once you start adding programming and iPhone apps and all this sort of stuff.
1 comments

That's already too complicated. You want a normally closed switch (i.e. on when not pressed). When the door is closed, it's pressed, and the light is off. When the door is open, the light is on.