Reaction times under Android
Hello,
I'm developing an app for Android where the user holds the metawear
board on his/her head. The app must react very quickly when the user turn the head.
In order to measure the time elapsed from the head movement to
the app reaction, I programmed the led on the board to turn on
when angular speed exceeds a specific threshold, using the react
component.
On the Android app a similar logic is programmed: it shows a
symbol when gyro data report a speed that exceeds the same
threshold set for the led onboard.
I measured the time difference of the led lighting and the symbol
appearing on screen using a 400fps camera. My requirement is to have this delay below 40ms.
On some devices (notably Samsung phones) I see delays not so far
from my requirement (i.e. 80ms), while on other devices I see
enormous delays (eg. on Huawei devices it goes up to 1000ms).
I tried setting Output Data Rate of the gyro to both 50Hz and
100Hz but I don't see any significant difference.
Do you have any suggestion on how I can meet my requirement?
Thanks in advance
Luca
Comments
I'm using metawear API 3.0
Regards
Thanks
thanks for you kind reply. I read the documentation at the link you sent. However I'm a bit confused. The pointed page addresses two topics:
a) data packing
b) reducing the connection interval on Bluetooth
To my understanding data packing will not help me, as I have a latency issue. Instead, Data packing, would provide higher throughput.
So I wonder if you were referring to changing the BLE settings instead. The suggested parameter (maxConnectionInterval) is the right one to tweak in order to reduce data latency?
Regards