Remix.run Logo
missinglugnut 7 days ago

It's one sensor in both cases, and in the latter case you can do so much more: change the thresholds in an update, detect when the lid is in the process of closing, apply hysteresis (on a simple switch, there's an angle where vibration could cause it to bounce between reading open and closed, but with an angle sensor you can use different thresholds for detecting and open and closing state change).

But most of all...you don't have to commit to a behavior early in the design process by molding the switch in exactly the right spot. If the threshold you initially pick isn't perfect, it's much easier to change a line of code than the tooling at the manufacturing plant.