olvvier/apple-silicon-accelerometer
reading the undocumented mems accelerometer + gyroscope on apple silicon macbooks via iokit hid
What's novel
reading the undocumented mems accelerometer + gyroscope on apple silicon macbooks via iokit hid
Code Analysis
9 files read · 3 roundsReads the undocumented MEMS accelerometer/gyroscope on Apple Silicon Macs via raw IOKit HID ctypes calls, provides a zero-dependency Python API with signal processing filters (Kalman, biquad, Mahony AHRS), and includes a terminal demo with vibration/heartbeat detection plus a vendored Objective-C ke
Strengths
Genuinely novel hardware access (undocumented SPU IMU via ctypes→IOKit) with zero external dependencies, proper lock-free shared memory ring buffers, and multiple real DSP algorithms (Kalman filter, Mahony AHRS, CUSUM, STA/LTA, wavelet decomposition) all implemented from scratch in pure Python.
Weaknesses
No test suite exists despite the mock/recording infrastructure being built for testing; some code duplication (Mahony AHRS implemented twice, shm_read_new vs shm_read_new_gyro are near-identical); the mock() method uses hash() which is non-deterministic across runs.
Score Breakdown
Signal breakdown
Innovation
Craft
Traction
Scope
Evidence
Commits
34
Contributors
4
Files
34
Active weeks
3
Repository
Language
Python
Stars
978
Forks
49
License
MIT