Show HN:我扭伤了脚,于是利用旧手机的传感器做了一个康复警报
3 分•作者: madinmo•8 个月前
打羽毛球时我扭伤了脚。医生说最好的康复方法是抬高患肢。但我很难判断我的脚是否处于正确的抬高位置。
所以,我开发了一个小应用来解决这个问题。每部智能手机里都内置了运动传感器。加速度计(测量 X、Y、Z 方向的运动)和陀螺仪(测量倾斜和旋转)。应用读取这些传感器数据,同时手机被绑在我的脚上。它持续检查角度,以判断我的脚是否处于正确的抬高位置。
如果我的脚处于良好的抬高位置,它会显示一个绿色的勾。如果我的脚垂下超过几分钟,手机就会发出声音、振动并闪烁红色,以提醒我。
这是一个有趣的小技巧,但它确实帮助我更好地康复,确保我的脚保持在应该在的位置。我最终把它命名为“抬高警察”。它就像我的私人脚踝监视器,为了我的健康而唠叨我。
讨论 - <a href="https://x.com/the2ndfloorguy/status/1968306219371655227" rel="nofollow">https://x.com/the2ndfloorguy/status/1968306219371655227</a>
查看原文
I twisted my foot while playing badminton. The doctor said the best way to recover is to keep it elevated. But I couldn’t really track whether my foot was in the proper elevated position or not.<p>So, I built a little app to solve this. Every smartphone already has motion sensors inside it. The accelerometer (measures movement in X, Y, Z directions) and the gyroscope (measures tilt and rotation). App reads these sensor values while the phone is strapped to my foot. It checks the angle continuously to know whether my foot is properly elevated or not.<p>If my foot is in a good elevated position, it shows me a green check. If it’s hanging down for more than a few minutes, the phone makes noise, vibrates, and flashes red to remind me.<p>It’s a fun little hack, but it actually helps me recover better by making sure my foot stays where it should. I ended up calling it “Elevation Police”. It's my personal ankle monitor that nags me for my own good.<p>discussion - <a href="https://x.com/the2ndfloorguy/status/1968306219371655227" rel="nofollow">https://x.com/the2ndfloorguy/status/1968306219371655227</a>