I believe this was originally explored by Sam Henri Gold, at least that's the first time I saw it a while ago :)
Links: https://samhenri.gold/labs/20250906-lid-angle-sensor/ https://github.com/samhenrigold/LidAngleSensor