Proximity sensor is a distance sensor that fetect objects without any physical contact . In this app the sensor output is represented by one and zero .
When sensor detect any object it'll transfer '1' to arduino otherwise it'll send '0' to arduino.Using combinations of one and zero we can control every thing we want from transducers to home appliances.
Algorithm that can be used on the arduino side is that continuously check whether char '1' is recieved or char '0' is recieved if char '1' is recieved it means that sensor has output HIGH now do what you want to do with it and vice verse .
Arduino is one of the most famous microcontroller. This app let you control of arduino from android phone .
Surely otg has several advantages over bluetooth .
1. It is cheap
2. Easy to connect
3. small size