Rishi Swethan Rishi Swethan -4 years ago 55
Android Question

How to increase the speed of transfer of data from android to arduino in bluetooth?

I'm trying to use an android app to do the processing of a path finding algorithm for a robot using Bluetooth. But currently, it takes 1 or 2 seconds for the transfer to complete, so that there is an output in the Arduino. Is there a way to minimise this to make the transfer-output instant?

This kind of delay is causing problems such as stopping instantly when an obstacle is detected. Is there any better way of doing this?
Thanks in advance!

Answer Source

Two simple solutions worked for me:-

  1. Increase the delay to 50 - 100 milliseconds.

  2. Add this after the Serial.begin(9600) in setup();

    Serial.setTimeout(50);
    

Step two is the most important. It worked for me only after I added the above code. This is not mentioned very often in many other forums that I have looked when I had the exact same problem.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download