How would I design an iPhone application to weigh an object? [duplicate]
Possible Duplicate:
How would you weigh something using an Ip开发者_Python百科hone?
I have a problem. I am trying to build an application that will allow iphone to weigh any objects ranging from 40 to 200 grams. This application should not require the iphone to balance on your finger as other similar application does. So my question is that is there any feature available on the iphone that will help measure the pressure on the iphone screen? How should I proceed to build that application?
Here is the website link for similar application that I intend to build. http://www.youtube.com/watch?v=GtpgZCZdTjE
you can always use the phone to call someone who knows the real weight of the object :P
What...?
There is no way to measure weight without an external peripheral.
Any solution that uses the accelerometer and balances on a finger will give sketchy results at best.
The iPhone has no pressure sensors.
Let's see... Thinking through that "balance on the finger" thing... I'm not familiar with that app, but it must be that you hang a weight of known mass on one end of the phone, hang the object you want to weigh on the other end of the phone, and then balance your phone on your finger. The point of balance could be used to figure out the relative weight between the known mass and the unknown mass. So, find the balance point, then tap the screen at the balance point and it does whatever math it takes to solve for the X of the unknown mass.
There's nothing in the sensor array to do this for you, though. Maybe if you had a spring of known, calibrated tension, and the unknown mass rotated the phone against that spring, then you could measure the rotation with the gyros? Kind of like the spring scale you probably used in high school chem lab except that instead of rotating a pointer against a dial, you're measuring the rotation with the gyro.
精彩评论