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.
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.
Neat. This method also assumes constant ambient pressure and temperature, and an ideal ziplock bag. (I.e., not stretchy, completely convex, and zero leaks.)
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.
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.
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)
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.
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
> 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?
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.
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...)
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.
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.
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.
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
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.
> 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.
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
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.
https://www.theverge.com/2015/10/28/9625340/iphone-6s-gravit...
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.
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.
How can something be available as a library but not as a native interface? Swift does not expose that API?
https://allthegooddomainsweretaken.justinmiller.io/2007/04/0...
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
[1] https://en.wikipedia.org/wiki/330_North_Wabash
https://www.youtube.com/watch?v=6uvQTTPr9Rw
you are a brave one
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.
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
I wonder if that affects this app at all.
* Not legal for trade outside of Ankh-Morpork.