Readit News logoReadit News
benoau · 5 months ago
There used to be iPhone apps that did something similar -

https://www.theverge.com/2015/10/28/9625340/iphone-6s-gravit...

cryptoz · 5 months ago
You can use any phone with a barometer to make a scale. All iPhones since the 6, and all the Pixels, and Samsung flagships have one. You get a zip loc bag, blow some air into it, put your phone in running an app that shows the pressure in a big font (so you can see it through the ziploc). Then you put an object of known weight on it like a quarter (balanced carefully on top of the air-filled ziploc) and note the pressure change on the display. With that, I think the weight / pressure change scales linearly, so you can now weigh anything small that you can balance on the ziploc.
xsmasher · 5 months ago
Wait, I know this one. You give the barometer to the superintendent if he tells you the height of the building.
nemosaltat · 5 months ago
no affiliation whatsoever but the app PHYPHOX has access to basically all of your iPhone sensors and can show the information in real time and save it, even has the capability of running a local python server so you can access it from a web browser on the same network or tethered device.
nhecker · 5 months ago
Neat. This method also assumes constant ambient pressure and temperature, and an ideal ziplock bag. (I.e., not stretchy, completely convex, and zero leaks.)
kiddico · 5 months ago
I'm adding this to my list of obscure tools I have in the back of my head
jbverschoor · 5 months ago
Dropbox shouldn’t exist either bc we have rsync ;)
ashertrockman · 5 months ago
If anyone happens to be using an iPhone 6S... http://touchscale.co/
hackmiester · 5 months ago
This worked all the way up through the iPhone Xs.
wanderingstan · 5 months ago
My memory was that the weight API was made private because they didn’t want people using iPhones for drug deals.
Wingman4l7 · 5 months ago
Apple, policing use of an API on a privately-owned device for purposes of a consensual, non-violent activity that is only technically a crime in some legal jurisdictions? Sounds about right.
Dban1 · 5 months ago
3D touch was god tier for FPS games on iOS
hn_throwaway_99 · 5 months ago
I think this is neat, but only in a Rube Goldberg machine sort of way. The instructions are:

1. Open the scale

2. Rest your finger on the trackpad

3. While mainting finger contact, put your object on the trackpad

4. Try and put as little pressure on the trackpad while still maintaining contact. This is the weight of your object

That is, the pressure sensors only work if it detects capacitance, so you need to be touching the track pad (but not too much!!) while weighing something.

wanderingstan · 5 months ago
This is a very clever hack, exactly the sort of thing that belongs on Hacker News.
namdnay · 5 months ago
Could a small piece of conductive foam or some cleverly layered tin foil+paper work? So put the object on the shim (which has a known or even negligeable weight)
acct-litter-al · 5 months ago
I once put some aluminum duct tape completely over the touch pad of an old laptop to see what would happen. Turns out it induced enough "eddy currents" to make the mouse move around the screen without me touching it--in a way, visualizing the currents!

I connected the foil to ground using a small strip of the tape to the ground metal of a USB port on the side and it disabled the touch pad.

svnt · 5 months ago
No, you need roughly a small human's worth of ground mass for most capacitive touch sensors to register a touch.
83 · 5 months ago
Could probably make a small stand with nubbins from touch screen pens as the feet.
ashertrockman · 5 months ago
On iPhones at least a hack was to rest a metal spoon on the screen and weigh something in the spoon...
linux2647 · 5 months ago
Sometimes you can get capacitance to be detected if you hover your finger just millimeters over the trackpad
jihadjihad · 5 months ago
Could you accurately weigh a hot dog?
dtgriscom · 5 months ago
No, only cool ones.
saaspirant · 5 months ago
I use a similar approach to weigh objects using gym weighing machine. It doesn't trigger unless there's skin touch.
whycome · 5 months ago
Can’t you get capacitance with a wet sponge? Like your typical dish cellulose sponge. You could make a small platform?
asimovDev · 5 months ago
I remember drawing on my old iPad back in the day by shoving a wet q-tip into a BIC pen and using it as a stylus. I am sure something similar could be rigged here
ivanjermakov · 5 months ago
> 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.

How can something be available as a library but not as a native interface? Swift does not expose that API?

bri3d · 5 months ago
Mac OS has "Private Frameworks" - shared libraries that are used by the system but don't ship with headers by default. It's trivial to produce these headers from the libraries, and then make wrappers for them like OpenMultitouchSupport which is a wrapper for MultitouchSupport.framework.
anxman · 5 months ago
But just to note, I believe you can't pass Gatekeeper/Notary if you use these APIs so it's not possible to sign the app
incanus77 · 5 months ago
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:

https://allthegooddomainsweretaken.justinmiller.io/2007/04/0...

dtgriscom · 5 months ago
I wrote that software, called SeisMac. Someone figured out the Apple-private API for the Sudden Motion Sensor that parks your laptop's hard drive if it detects free-fall. Working from that, I wrote a free app that used the API to show three-axis acceleration graphs. I was proudest of the calibration utility, which had you tip your laptop on its side (with properly rotated dialogs!), and then on its screen.

People would send me recordings from all over the world (e.g. on a ship in the Drake Passage showing enormous surges). It was a lot of fun, and I even got an educational grant to improve it.

Big bummer when Apple switched to solid-state drives (well, a bummer for my one small reason...)

[0]: https://en.wikipedia.org/wiki/Sudden_Motion_Sensor

incanus77 · 5 months ago
Awesome, the name rings a bell now! Thanks for that. Honestly didn't remember the software involved (nowadays, I'd mention it in the blog post).
CalChris · 5 months ago
I used an iPhone as an air pressure recorder. There's an app for that; many actually. Anyways, the trunk gate on my car wasn't sealing and when it went over pavement joints on the highway it would slightly open and then close in quick succession which was nauseating. I showed the data to Tesla service and they (grumbled and) readjusted the trunk gate. The problem disappeared.
bitwize · 5 months ago
Reminds me of the people who used their ThinkPad's vibration sensor to detect smacks on the machine, and rigged their X window manager to switch virtual desktops when smacked from the appropriate side, panning right when smacked on the left, and left when smacked on the right.
1bpp · 5 months ago
this update breaks my case smacking workflow, please revert
incanus77 · 5 months ago
Oh, I vaguely remember someone hacking that for some sort of windowing back then on OS X!
stockresearcher · 5 months ago
I heard that IBM decided to move out of this building [1] because vibration due to the construction of the tower across the street kept destroying hard drives in their computing center.

[1] https://en.wikipedia.org/wiki/330_North_Wabash

mananaysiempre · 5 months ago
Obligatory link to Brendan Gregg shouting at hard drives: https://www.youtube.com/watch?v=tDacjrSCeq4.
tonymillion · 5 months ago
The best use of the SMS in the MacBook… or should I say SMACKbook

https://www.youtube.com/watch?v=6uvQTTPr9Rw

mikpanko · 5 months ago
Very cool. Curious: what is the minimum and maximum weight MacBook's trackpad can reliably measure this way?
alden5 · 5 months ago
It goes in gram increments and my laptop was able to read 7300g pressing as hard as i could, which I was surprised it would be designed to read that high, might go up to 10kg but I don't want to crack my trackpad lol. The actual measurements though are extremely unreliable. I've found it can't reliably measure anything, measuring a roll of tape gave me measurements from 70g to 700g, it always settled on a number but was different every time. Maybe the underlying data is more accurate but this API is definitely just designed for outputting the force of a finger. M1 MBP for reference
cAtte_ · 5 months ago
> pressing as hard as i could

you are a brave one

pmxi · 5 months ago
This is clever! and potentially useful too.

Have you done any testing to determine how precise and accurate this is? I suspect their must be a lot of variance between laptops, since this isn’t an intended use case.

mschuster91 · 5 months ago
> I suspect their must be a lot of variance between laptops, since this isn’t an intended use case.

Yeah and so it is for ordinary strain gauges aka load cells. You can either use a 2 point calibration (aka no load followed by known load) or if you want more precision a 3 point calibration.

[1] https://en.wikipedia.org/wiki/Load_cell

alden5 · 5 months ago
The app isn't accurate at all, magic 8-ball of scales, anything you put on the trackpad it'll settle on a weight and give you a number but it'll be random. The app will accurately tell you how much force you're applying with a finger but when putting something else on it'll settle on a random number
cluckindan · 5 months ago
I would assume Apple hardware comes precalibrated. Homogeneity is everything for their product lines, down to individual calibration of screens and audio hardware. It would be weird to get a new laptop and have its trackpad feel different.
hbn · 5 months ago
They have a setting for adjusting the pressure needed to activate a click.

I wonder if that affects this app at all.

pavon · 5 months ago
I love this, such a creative hack, and the wonderful irony that it only works when one has their finger on the scale.

* Not legal for trade outside of Ankh-Morpork.

skyboo · 5 months ago
Reminds me of this from when I had an HDD Macbook https://uri.cat/software/LiquidMac/
wingworks · 5 months ago
That was such a cool app!
WalterGR · 5 months ago
“It mimics the behavior of liquid by creating a particle system that reacts to the computer's orientation.”