• benoau 12 days ago

    There used to be iPhone apps that did something similar -

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

    • cryptoz 12 days 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 12 days ago

        Wait, I know this one. You give the barometer to the superintendent if he tells you the height of the building.

        • jschulenklopper 8 days ago

          Not everyone got the Niels Bohr joke that you subtly pulled there.

          • fruitplants 11 days ago

            It's pronounced thermometer. :-)

            • Raed667 12 days ago

              how about stacking the barometers ?

              • rzzzt 12 days ago

                Do I measure the passenger plane with or without the ship?

            • nemosaltat 12 days 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 11 days 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.)

              • Doxin 9 days ago

                I don't think stretch would matter, or even leaks for that matter. It'd still find equilibrium at the same pressure, no?

              • kiddico 12 days ago

                I'm adding this to my list of obscure tools I have in the back of my head

                • jbverschoor 12 days ago

                  Dropbox shouldn’t exist either bc we have rsync ;)

                  • Nathan2055 12 days ago

                    The infamous Dropbox comment[0] actually didn't even cite rsync; it recommended getting a remote FTP account, using curlftpfs to mount it locally, and then using SVN or CVS to get versioning support.

                    The double irony of that comment is that pretty much all of those technologies listed are obsolete now while Dropbox is still going strong: FTP has been mostly replaced with SFTP and rsync due to its lack of encryption and difficult to manage network architecture, direct mounting of remote hosts still happens but it's more typical in my experience to have local copies of everything that are then synced up with the remote host to provide redundancy, and CVS and SVN have been pretty much completely replaced with Git outside of some specialist and legacy use cases.

                    The "evaluating new products" xkcd[1] is extremely relevant, as is the continued ultra-success of Apple: developing new technologies, and then turning around and marketing those technologies to people who aren't already in this field working on them are effectively two completely different business models.

                    [0]: https://news.ycombinator.com/item?id=9224 [1]: https://xkcd.com/1497/

                    • OskarS 11 days ago

                      It's also not the same thing as Dropbox was offering: that's a description of a network drive, but the key thing about Dropbox is that it's a syncing engine. It's a much harder thing to do, but with very big benefits: much faster (since it's just reading off disk) and offline access.

                • ashertrockman 12 days ago

                  If anyone happens to be using an iPhone 6S... http://touchscale.co/

                  • hackmiester 12 days ago

                    This worked all the way up through the iPhone Xs.

                    • jmb99 12 days ago

                      The single most irritating killed feature from Apple. Redesign half of their UI to rely on 3D Touch to make sense, then get rid of 3D Touch without redesigning the UI. Previewing links, moving the cursor, interacting with items, they’re all “press and hold until haptic feedback” instead of “quickly press hard and get immediate feedback.” Easier to accidentally trigger, slower to trigger on purpose.

                      • 05 12 days ago

                        Hardware cost+extra weight (need to make the glass thicker to be able to handle extra force and not push on the display). Turns out nobody was really using it because discoverability sucked..

                        • jmb99 12 days ago

                          Hardware cost & weight, fine. Glass doesn't need to be thicker than it currently is (I can press on my 13 Pro's screen about twice as hard as was needed for 3D Touch's max depth, and no issues with the screen), and the last time I replaced a battery on a 12, the screen was just as thick as the XS.

                          >Turns out nobody was really using it because discoverability sucked..

                          Sure, but then redesign the UI after removing 3D Touch to not be equally undiscoverable but less precise. Even on the latest iOS beta with its full redesign, there's still many, many actions that require a long press that are completely undiscoverable. (For example, if you don't have the Shazam app installed, go find the list of songs Siri has recognized when asked "What's this song?" Don't look up the answer.)

                          • yoz-y 12 days ago

                            The discoverability sucked because Apple never rolled this out to all of the devices, themselves grossly under utilized the feature and eventually ghosted it.

                            It was by far the best cursor control paradigm on iOS. Now everything is long press which is slow and as error prone.

                            I’m all for proposing different paradigms as accessibility but 3dtouch was awesome.

                            • macNchz 11 days ago

                              3D Touch was amazing for typing alone, I miss it basically every day when I type more than a couple of words on my phone. It was so great to be able to firm-press and slide to move the insertion point, or firmer press to select a word or create a selection. It was like a stripped down mobile version of the kind of write-and-edit flow of jumping around between words that I can get on a proper keyboard with Emacs keybindings drilled into my brain.

                              • cluckindan 12 days ago

                                Nobody? Really? It’s definitely the UX feature I miss most on modern iPhones. Long press feels janky in comparison.

                              • ahoka 11 days ago

                                Apple UX is generally very bad, especially around discoveribility.

                                • bagels 12 days ago

                                  I hated when my mother in law came to me for help using her iPhone. She had a hard time controlling and understanding 3d touch.

                                  • behnamoh 12 days ago

                                    I don't like it when old people are the reason the rest of us can't have nice things. Some grandma in Nebraska can't use 3D touch and now the rest of the demographic of Apple's customers are deprived of it.

                                • fouc 11 days ago

                                    iPhone 6s and 6s Plus (2015) - First to introduce 3D Touch
                                    iPhone 7 and 7 Plus (2016)
                                    iPhone 8 and 8 Plus (2017)
                                    iPhone X (2017)
                                    iPhone XS and XS Max (2018) - Last models with 3D
                                  
                                  Interesting that the iPhone SE 2nd/3rd generation with iPhone 8 form factor do not have 3D touch but "Haptic touch" instead.
                              • wanderingstan 12 days ago

                                My memory was that the weight API was made private because they didn’t want people using iPhones for drug deals.

                                • Wingman4l7 11 days 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 11 days ago

                                  3D touch was god tier for FPS games on iOS

                                  • notpushkin 12 days ago
                                  • hn_throwaway_99 12 days 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 12 days ago

                                      This is a very clever hack, exactly the sort of thing that belongs on Hacker News.

                                      • namdnay 12 days 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 12 days 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.

                                          • acct-litter-al 12 days ago

                                            Looking back, it would have been interesting to code up a program to record the movement of the mouse as a trail of pixels...

                                            • KeplerBoy 11 days ago

                                              If you ever want to do this keep in mind to reconfigure the mouse as a digital pointing device (tablet like), otherwise the mouse acceleration will mess up your position measurement.

                                          • svnt 12 days ago

                                            No, you need roughly a small human's worth of ground mass for most capacitive touch sensors to register a touch.

                                            • stavros 12 days ago

                                              How do capacitive pens work?

                                              • svnt 11 days ago

                                                You electrically couple to the pen, unless they are active devices, in which case they generate a signal.

                                                • stavros 11 days ago

                                                  That can't be, they work with gloves and things. My gloves even have a thing at the end that works with the touchscreen.

                                              • bigyikes 12 days ago

                                                Tape a wire to the trackpad and hold the wire?

                                                • amelius 11 days ago

                                                  ground mass?

                                                  • sanex 11 days ago

                                                    If you don't have ground human presumably you can substitute ground beef or ground turkey.

                                                • 83 12 days ago

                                                  Could probably make a small stand with nubbins from touch screen pens as the feet.

                                                • ashertrockman 12 days ago

                                                  On iPhones at least a hack was to rest a metal spoon on the screen and weigh something in the spoon...

                                                  • linux2647 12 days ago

                                                    Sometimes you can get capacitance to be detected if you hover your finger just millimeters over the trackpad

                                                    • jihadjihad 12 days ago

                                                      Could you accurately weigh a hot dog?

                                                      • dtgriscom 12 days ago

                                                        No, only cool ones.

                                                      • saaspirant 11 days ago

                                                        I use a similar approach to weigh objects using gym weighing machine. It doesn't trigger unless there's skin touch.

                                                        • whycome 12 days ago

                                                          Can’t you get capacitance with a wet sponge? Like your typical dish cellulose sponge. You could make a small platform?

                                                          • asimovDev 12 days 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

                                                            • dotancohen 12 days ago

                                                              I've used carrots and cucumbers as a capacitive stylus while wearing gloves.

                                                              It's the reason why I love Note and S Ultra phones - the stylus. I'm using it now.

                                                              • doubled112 12 days ago

                                                                The recipe was on your phone/tablet and there was no way you were taking your gloves off?

                                                                • Y_Y 12 days ago

                                                                  I use this to avoid touching the stupid self-checkout machines when buying groceries

                                                          • ivanjermakov 12 days 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 12 days 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 12 days 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

                                                                • klausa 11 days ago

                                                                  Notarisation is not supposed to check for things like this; but you certainly would not be able to ship this to the App Store.

                                                            • incanus77 12 days 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 12 days 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 12 days 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 12 days 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 12 days 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 12 days ago

                                                                      this update breaks my case smacking workflow, please revert

                                                                      • incanus77 12 days ago

                                                                        Oh, I vaguely remember someone hacking that for some sort of windowing back then on OS X!

                                                                    • stockresearcher 12 days 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 12 days ago

                                                                        Obligatory link to Brendan Gregg shouting at hard drives: https://www.youtube.com/watch?v=tDacjrSCeq4.

                                                                        • js2 12 days ago

                                                                          Gosh I hope there are some lucky 10K seeing this today.

                                                                          • stavros 12 days ago

                                                                            I was one!

                                                                      • tonymillion 11 days ago

                                                                        The best use of the SMS in the MacBook… or should I say SMACKbook

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

                                                                      • mikpanko 12 days ago

                                                                        Very cool. Curious: what is the minimum and maximum weight MacBook's trackpad can reliably measure this way?

                                                                        • alden5 11 days 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_ 11 days ago

                                                                            > pressing as hard as i could

                                                                            you are a brave one

                                                                        • pmxi 12 days 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 12 days 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 11 days 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 12 days 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 12 days ago

                                                                                  They have a setting for adjusting the pressure needed to activate a click.

                                                                                  I wonder if that affects this app at all.

                                                                              • pavon 12 days 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 11 days ago

                                                                                  Reminds me of this from when I had an HDD Macbook https://uri.cat/software/LiquidMac/

                                                                                  • wingworks 11 days ago

                                                                                    That was such a cool app!

                                                                                    • WalterGR 11 days ago

                                                                                      “It mimics the behavior of liquid by creating a particle system that reacts to the computer's orientation.”

                                                                                    • jordanmorgan10 12 days ago

                                                                                      Back when we had 3D Touch, there was UIForce which did this. I still lament the loss of 3D Touch to this day :-(

                                                                                      • volemo 12 days ago

                                                                                        It was such a useful feature! I mourn it every time I try to save a picture from Google and iOS selects nonexistent text around it. :(

                                                                                      • jahantech 12 days ago

                                                                                        This is exactly why normal people call us geeks "weird". Keep bringing on the cool stuff!

                                                                                        • mig39 12 days ago

                                                                                          Very cool, Krish! Hi from Fort McMurray! I'm going to use this project as an example for a Computer Science class.

                                                                                          • projektfu 12 days ago

                                                                                            Could it be used to provide gait analysis for your pet mouse?

                                                                                            • undefined 12 days ago
                                                                                              [deleted]
                                                                                            • qoez 12 days ago

                                                                                              Apparantely on safari there's touch strength so this should be possible to make for the web too, cool

                                                                                              • ashertrockman 12 days ago

                                                                                                Somebody could use this as a starting point. http://touchscale.co/ You'd have to collect new data on touch strength vs. weight to get the regression parameters.

                                                                                                (If you do this, let me know and I can add it to the site above, and then we can both delight in the surprisingly large amount of unmonetizable traffic it gets.)

                                                                                              • markstos 11 days ago

                                                                                                If you are backpacking with your Macbook, this saves you from also needing to pack a kitchen scale.

                                                                                                • arm32 12 days ago

                                                                                                  I must not use this for weed, I must not use this for weed, I must not use this for weed

                                                                                                  • dmd 12 days ago

                                                                                                    Why not?

                                                                                                    • ThatMedicIsASpy 12 days ago

                                                                                                      Weed can be sticky depending on the strain/harvest/cure time

                                                                                                      • arm32 12 days ago

                                                                                                        The sticky icky would completely destroy my beautiful, black M3 MBP.

                                                                                                  • DonHopkins 12 days ago

                                                                                                    Just what I need to roll the quantitative doobie.

                                                                                                    • fnord77 12 days ago

                                                                                                      What's the weight range it can handle? no mention of it and I don't want to dig through code

                                                                                                      • theyknowitsxmas 12 days ago

                                                                                                        Apple would've made an app a long time ago but would get sued after someone put a tire on it.

                                                                                                        • mrexroad 12 days ago

                                                                                                          I can already picture the Reddit post of an inverted aeropress brew fail while using trackpad as scale.

                                                                                                        • mrheosuper 11 days ago

                                                                                                          OT, but this is what i love about apple laptop. They care about small detail, the detail that won't be on spec sheet for advertising.

                                                                                                          Like their laptop speaker is superior to any other machine, even premium laptop like xps or surface won't even come close. Or their huge trackpad but still accurate.

                                                                                                          I wish other manufacturers copy this from Apple.

                                                                                                        • jojohohanon 11 days ago

                                                                                                          I was a bit frustrated that the expected precision wasn’t on the main summary screen.

                                                                                                          Does anyone know?

                                                                                                          • conflictracker 11 days ago

                                                                                                            Best repo I discovered this month. I love this kind of stuff.

                                                                                                            • qwertytyyuu 12 days ago

                                                                                                              Ah I remember being able to do this with the iPhone 6s

                                                                                                              • tln 12 days ago

                                                                                                                No download link?

                                                                                                                • ChrisMarshallNY 12 days ago

                                                                                                                  I think it's a DIY project.

                                                                                                                  • addandsubtract 12 days ago

                                                                                                                    DIY projects can't be downloaded?

                                                                                                                    • ChrisMarshallNY 12 days ago

                                                                                                                      By "downloaded," I expect that you mean "Built, tested, and deployed." It's not an App Store app. It's basically a technology demo. Get Xcode, and build it and run it.

                                                                                                                      • lucasoshiro 12 days ago

                                                                                                                        A .dmg or at least a CLI instruction would really help

                                                                                                                • ferbass 10 days ago

                                                                                                                  This is a clever idea, well done!

                                                                                                                  • subdev 12 days ago

                                                                                                                    How does one come up with this idea?

                                                                                                                    • thrownawaysz 12 days ago

                                                                                                                      Can someone compile a binary? Don't want to download Xcode just for that...

                                                                                                                      • koiueo 12 days ago

                                                                                                                        Finally, some actually useful usage scenario for that oversized trackpad

                                                                                                                        • byyoung3 12 days ago

                                                                                                                          great work

                                                                                                                          • crunchychestnut 7 days ago

                                                                                                                            [dead]

                                                                                                                            • ynniv 12 days ago

                                                                                                                              Finally some hacker news

                                                                                                                              • crunchychestnut 10 days ago

                                                                                                                                [dead]

                                                                                                                                • crunchychestnut 10 days ago

                                                                                                                                  [dead]

                                                                                                                                  • ChrisMarshallNY 12 days ago

                                                                                                                                    Very cool, but I'd still probably just buy a cheap digital scale.

                                                                                                                                    • raldi 12 days ago

                                                                                                                                      The best digital scale is the one you have with you ;)

                                                                                                                                      • j45 12 days ago

                                                                                                                                        One less thing to carry.

                                                                                                                                    • robthebrew 12 days ago

                                                                                                                                      [flagged]

                                                                                                                                      • xyst 12 days ago

                                                                                                                                        [flagged]

                                                                                                                                        • elif 12 days ago

                                                                                                                                          [flagged]

                                                                                                                                          • yonatan8070 12 days ago

                                                                                                                                            The finger contact requirement seems rather logical when you consider that it's a touchpad, why bother processing force inputs when there's no touch?

                                                                                                                                            • hbn 12 days ago

                                                                                                                                              > 3rd party application to keep your computer from falling asleep

                                                                                                                                              Settings -> Desktop & Dock -> Hot corners -> set one to "Disable Screen Saver"

                                                                                                                                              Then just shove your cursor into that corner whenever you want to leave your computer without it sleeping

                                                                                                                                              • whywhywhywhy 12 days ago

                                                                                                                                                > 3rd party application to keep your computer from falling asleep

                                                                                                                                                Type `caffeinate` into the terminal, your mac will stay awake until you ctrl+c it

                                                                                                                                                • makeitdouble 12 days ago

                                                                                                                                                  It's a lot more fiddly than that.

                                                                                                                                                  I remember trying a bunch until finding some combination that worked, and looking around it sounds like it's still a common issue:

                                                                                                                                                  https://apple.stackexchange.com/questions/475477/caffeinate-...

                                                                                                                                                  • pratyahava 12 days ago

                                                                                                                                                    for personal use i created a LaunchDaemon to keep `caffeinate -s` running all the time

                                                                                                                                                      /Library/LaunchDaemons/ze.caffeinate.plist
                                                                                                                                                    
                                                                                                                                                      <?xml version="1.0" encoding="UTF-8"?>
                                                                                                                                                      <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
                                                                                                                                                      <plist version="1.0">
                                                                                                                                                      <dict>
                                                                                                                                                          <key>Label</key>
                                                                                                                                                          <string>ze.caffeinate</string>
                                                                                                                                                          <key>ProgramArguments</key>
                                                                                                                                                          <array>
                                                                                                                                                              <string>/usr/bin/caffeinate</string>
                                                                                                                                                              <string>-s</string>
                                                                                                                                                          </array>
                                                                                                                                                          <key>KeepAlive</key>
                                                                                                                                                          <true/>
                                                                                                                                                      </dict>
                                                                                                                                                      </plist>