Did you know your MacBook has a sensor that knows the exact angle of the screen hinge?

It’s not exposed as a public API, but I figured out a way to read it and make it sound like an old wooden door.

Source code and a downloadable app to try it yourself: https://github.com/samhenrigold/LidAngleSensor

@samhenrigold Apple Store employees are supposed to set up laptops with a specific screen angle. I wouldn't be surprised if the sensor exists entirely for that reason.
@cinebox @samhenrigold That would be costly, when they could just give everyone a precut piece of angled plastic to hold between the keyboard and screen on setup.
@macinthrope @samhenrigold I believe the previous solution was an iphone app they held against the screen that changed color when at the right angle