My data field app reads the data flow of a BLE sensor, interprets the received data and generates display values for the data field. The data is received as a byte array via the callback function “onCharacteristicChanged”, each in 20 byte blocks.
The sensor sends between 80-120 bytes per second. The callback function is therefore called approx. 4-6 times per second.
What is the better strategy for processing the incoming data: Immediately, in the callback function? Or buffering in a separate byte array, which is evaluated once per second in the compute() function?