I am currently working on a project where it is critical to keep the phone 3 cm away from an object . Thus , I want to allow the Andriod phone (SAMSUNG S4) to communicate with the distance sensor through the Andriod. The distance sensor will inform the Andriod when the object is 2 cm away from it. Thus, the application will work as follows:
- open the application ...2) the sensor will open immediately and will ask the user to be close to the object by 3 cm ....3) so the user will keep moving till the sensor will tell the aAndriod that the user is now 3cm and Andriod will display it to user so he/she can start the application. i want help in making this code and communication between Android+Arduino+Senor . for this I am using the following sensor and Arduino :