I think it would require everything to be perfect! While you are using the HC-05 (Classic BT) you must ensure the data stays within the 20 bytes limit (per data package = Serial Print line). The App might cope with the process better if you append the data to a Label component first (or a variable), and when the stream is stopped, write/append the file, only adding Time, Date at that point.
That EOD marker needs to be \n - in the Sketch: Serial.Println(), in the App ASCII Char '10'.
You would use the 'Append to File' Block, but the speed required I think will prohibit stream-to-file. Note that the microprocessor could write the data directly to file.
To create a file in Android via your App takes more effort than it used to because of recent Google security measures. See:
Note that the App process time interval needs to be approximately 20% faster than the microprocessor (loop) time interval. So if the data is being sent every 250 milliseconds, the App time interval would be set at 200 milliseconds. Use a timed interval in your Sketch rather than Delay(). I would start with a larger time interval, say 500 milliseconds, and tweak that until the process throws a tantrum.
Basic BT Classic file to use or plunder:
BT_Basic_Setup_Receive.aia (7.2 KB)
