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

I have so much free time it’s unbelievable. I’m open to full-time work in NYC or remote. Senior product designer/design engineer. https://samhenri.gold
Sam Henri Gold

Sam Henri Gold is a product design engineer building playful, useful software.

@samhenrigold for this precious & perfect magic that you have bestowed upon us, may your dream job be just around the corner (or working remotely). thank you. :)

@kathimmel @samhenrigold

☝️ ☝️ ☝️ ☝️ 💯

@samhenrigold
(Plays video)
“What’s that??”
“Theremin.”
“What’s that?!”
“Theremin.”
“WHAT’S THAT?!”
“A musical instrument.”
“Is that your phone?!?!”
“Yes.”
“Don’t give me weird answers. Just say it’s your phone.”
@joesteel oh you’re better than me, i would’ve totally escalated “WHAT’S THAT” with a louder “THEREMIN”
@samhenrigold very cool, and I also predict a lot of broken screen hinges in the future
@samhenrigold how much have you ruined your hinge testing this
@willhbr i didn't buy applecare just to NOT fuck up the hinge
@samhenrigold "honestly Tim it was like that when I bought it, please don't look my my mastodon"
@samhenrigold @kf nice - just in time for spooky season!
@kboyd @samhenrigold @kf it's a pumpkin spice hinge hack!
@samhenrigold hehehe, I'd love to have it on my Linux laptop 😄 😂
@justbob @samhenrigold lmfao, mine is so old, I don't even need an app for the sound

@utf_7 @samhenrigold

😂 I can relate. Some of the "old" systems that I've rebuilt into non Microsoft systems...

@samhenrigold this brings joy to my day 🥰
@samhenrigold I have an idea! You could have it scrub the startup chime based on the angle, which would be fun while opening and shutting it, but you could also work it like a turntable
@rezmason @samhenrigold my idea was a version of pacman where you have to "munch" to move
@samhenrigold I want to hear this sentence said about a lot more situations
@samhenrigold hinge replacement rates explode 100x in the next few months
@samhenrigold I love this so much...

@samhenrigold Awesome discovery, this is even working on the Web via the WebHID API (chromium based browsers only)

https://vnjlhn.csb.app/

(Just displaying the value no fancy sounds)

WebHID Demo - Lid Tilt

@samhenrigold if I had macbook I wouldnt be able to focus Id be just messing around with the sounds and how long would the hinges last  good stuff you have created 
@samhenrigold Now I think that one is why Apple doesn't exposes it, imagine the amount of entirely used up hinges due to people playing with the lid.

@samhenrigold
And when your LCD fails, you need to replace the entire screen assembly, including hinges and sensor.

Sensor need calibration to know the angle (which was not needed on previous macbooks, that had a dumb Hall effect sensor, and a magnet).

Apple never made this calibration tool available to unofficial repair shops...

So the macbook repair community did one themselves :
https://github.com/Vladislav98759/Macbook-Lid-Angle-Sensor-Calibration-Tool

@samhenrigold great for watching vintage Dr. Who, even if it’s a bit difficult to actually see the screen.
@samhenrigold angle for pitch, and then light- or temperature-sensor for volume? (or vice versa)
@samhenrigold This is a fun little app. Thanks for sharing.
@samhenrigold this should be combined with the pressure sensor in the trackpad for the Theremin’s second degree of control so you can use *two* undocumented sensors.
@samhenrigold I wonder whether "I wanted to play the Doctor Who theme" would be a reasonable explanation when my boss asks why my work laptop is broken ​
@samhenrigold This is the missing piece for a good laptop-accordion! https://www.instagram.com/p/DIuATrQI-Hk/
Anatole Muster on Instagram: "come see us live in london 👨🏼‍💻 may 15 @thejazzcafe it's my album release show #laptop #logicprox with my 🐕's @king.ie 🥁 and @hugo_piper on bass 🎥 @will.rhodeo"

8,284 likes, 133 comments - anatolemuster on April 21, 2025: "come see us live in london 👨🏼‍💻 may 15 @thejazzcafe it's my album release show #laptop #logicprox with my 🐕's @king.ie 🥁 and @hugo_piper on bass 🎥 @will.rhodeo".

Instagram