Hi Kf,
I am not sure if I am allowed to ask this question here but since you gave me the great idea, here goes;
I have attempted to stream the data I am receiving by concatenating each of the data arrays I am receiving via BLE to a new array dataBuffer. The dataBuffer is then written into a text file after a set interval of 20 seconds, as seen in the uploaded image. Since the data is being sampled at 8kHz when there is an interval of 20 seconds I am expecting around 160,000 samples, but I am only storing 7620 in the text file.
My question is, can node.js keep up with the concatenating speed of the dataBuffer array to store all of the data in that variable or is this method not a viable one as the speed of the incoming data is relatively fast?