Bluetooth - Efficient Data Send Rates

I have a simple question, probably with an "it depends" answer, but I'll try and cover as much background as possible.

I have an ESP32 that is bluetooth connected to an android app (MIT inventor).

The ESP sends data in a string, currently every 5000ms. No problems. However, I'm now adding functionality for the ESP32 to receive data from buttons and setup variables from the App.

I'd like the app to only recognize a button click or a change in settings once the data has done a round trip from the app, to the ESP32 and back to the app as a way of confirming the inputs have taken effect.

Obviously retaining the 5000ms period I currently have on the ESP32 is going to be way too laggy for the app side of things.

My question: is there any guidance out there about how often data can be sent from the ESP32 before it starts becoming a processing/throughput/battery life issue?

Given this forum is for Arduino, so the question here mostly relates to the ESP32, but guidance on the android app side of things would be welcome also.

You dead right about that. If it depends on anything, it depends on the amount of data, a matter you appear to ignore.

The obvious path is to suck-it-and-see. It is very likely that you have no problem, and you shouldn't worry until it is clear that there is one.

The data is not tiny, but I'd call it small. Mostly numbers with '|' delimiters - the zeros will end up mostly being small integers:

0.00|0|0.00|0.00|0.00|||0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|45171

Curently once every 5 seconds using a millis() test.

Before I wrote my original post above, the data sending code was just part of the main loop under the millis() test.

I've decided to move the data sending code into a Function. I will continue to call it every 5 seconds while nothing else is happening. However, if i receive new data from the phone on which I need to act on, i'll just call the data sending Function immedaitely to provide a once-off update.

I think that's probably the smartest way to manage data movements.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.