Using a MacBook Trackpad As a Scale
Krish Shah (via Hacker News):
TrackWeight is a macOS application that transforms your MacBook’s trackpad into an accurate weighing scale by leveraging the Force Touch pressure sensors built into modern MacBook trackpads.
[…]
TrackWeight utilizes the Open Multi-Touch Support library by Takuto Nakamura to gain private access to all mouse and trackpad events on macOS. This library provides detailed touch data including pressure readings that are normally inaccessible to standard applications.
The key insight is that trackpad pressure events are only generated when there’s capacitance detected on the trackpad surface - meaning your finger (or another conductive object) must be in contact with the trackpad. When this condition is met, the trackpad’s Force Touch sensors provide precise pressure readings that can be calibrated and converted into weight measurements.
This reminds me of how, twenty years ago, I used the PowerBook’s hard drive vibration sensor to rig up a seismograph to measure construction noise.
Previously: