I don't have experience in this area. But, it would be helpful to know what kind of sensor is detecting the magnet in the lid. For example, if it is a reed switch and is SPST, there is no way to detect whether the lid is closed or flipped back. But, if it is a hall effect of some sort, you might be able to detect the polarity of the magnetic field and determine whether the lid is flipped back or closed. If hardware can detect polarity, the rest is just software.
Pinephone Pro enthusiast and SUPER-HYPED for PineTab 2! PT2 is AWESOME!
Former electrical engineer. Current rancher.
I know a lot about a few things, a little about a lot of things and am ignorant of an unknown number of things.
Former electrical engineer. Current rancher.
I know a lot about a few things, a little about a lot of things and am ignorant of an unknown number of things.