Mac motion sensor?
There used to be an extension that provided motion sensor from the Apple embedded accelerometer (bookmotion, from here) but it's in powerpc/intel/max4 limbo.
I took the obtuse route of wondering if I could get this data by embedding a web page through node and reading sensor data through that, but gave up quickly - it only works through SSL and it seems ludicrous amounts of overhead to get at very simple data.
Is there an up-to-date extension that provides access to this kind of on-board sensor data or have we lost this to time and the cult of corporate security?
sudden motion sensor was only found in older non SSD macs.
If I remember correctly, last one was out in 2012.
And it still can run 32 bit system, software and max.
If you have such one, you can as well use aka.bookmotion and pass
sensor data to 64 bit max.
or try last SMSLib which is 64 bit with shell external.
call smsutil with report interval argument (float seconds), like :
smsutil -1 0.1 (100ms)
use slash based absolute path to smsutil, example:
~/Desktop/SMS/smsutil -i 0.1
in case it is in folder SMS on Desktop
here you can see max 8.5.7 using smsutil, Max 7.3.6 & Max 6.1.10 using aka.bookmotion at same time on 2011 MacBook Pro / High Sierra.

Thanks for the reply and contextualisation, S. Audio!
sudden motion sensor was only found in older non SSD macs.
If I remember correctly, last one was out in 2012.
This would explain a lot of things.
Thanks for SMSLib - such an exciting flashback to be sharing executables on a forum! - but it's angered that I'm using Apple silicon now.
It makes sense for it not to be on board a macbook, but what a fun sensor to get rid of to save ... cents?
well it is not to save cents, but it got obsolete
because ssd would not benefit at all from that sensor.
It was actually disturbing in some cases when one took macbooks
out to record something. A little shake would park the HD and
ruin recordings. One could turn it off though using terminal.
If you need a gyro or accel sensor for fun, why not a tiny arduino ?
One can shake it much easier then old macbook.
also iPhone sensors to OS
I could hook in an Arduino but it's another layer of things to break in a bag.
In the end, I bottled it and used Mira to send iPad accelerometer data, which works and is easy, but isn't as dramatic. The idea of tipping a machine and the screen responding to the movement in a resonant manner is an act of theatre, whereas using another device exposes the workings to and breaks the illusion.
It's a shame it's not kept as a sensor; there's lots of interesting data it can produce that doesn't need to be tied into spinning platters. If the iPad and iPhone have them, why not the mac? oh well.
In tablets and phones accelerometers and gyroscopes have many crucial applications: screen orientation, measurements, counting steps, user interaction ("shake to undo"), gaming, and so on.
Laptops are usually... sitting on your lap on on a desk. Moving a computer around for theatric effect is quite the niche...
Anyway, there are very tiny usb-connected gyroscopes and accelerometers (like these: https://www.yoctopuce.com/EN/products/category/usb-position-sensors, or based on arduino, check adafruit or similar for very small boards). IMHO, you can quite easily hide one next to the keyboard, or attach it to the lid and mask it.