问题
I'm trying to calculate the distance between and android device and the HC-05 bluetooth module (connected to an arduino module: the MEGA 2560), using an android app created using appinventor.
For example I'd like to know if the devices are 4 meters from each other so I can turn on an alarm.
After doing some research it seems that is almost imposible to do, it seems that the most that can be done is estimate that distance constantly sensing the RSSI indicator.
Is this possible? if not ,what could I use?
Are the elements of my project (HC05,arduino, appinventor) the ones I should be using?
Is this the only way?
回答1:
If the two points are within line of sight, then you can use a laser based rangefinder system, or something that uses "Time of flight" using a sound wave or a light wave. Here's one that I found with a quick google: http://hackaday.com/2014/07/01/pew-pew-an-arduino-based-laser-rangefinder/ We run into an issue with omni-directionality though,
If they don't have line of sight, you're going to have to think about how the signal is attenuated with whatever is in the way, because the difference in attenuation between a brick wall, and a gypsum(drywall) wall is great.
来源:https://stackoverflow.com/questions/29859666/distance-between-bluetooth-module-and-an-android-device