How to save data receiving via BLE into the text file?


I am trying to save data receiving via BLE into the text file.

I can handle the BLE part but how to save it into the text file?

Appreciate your help.

Hello minkduc

Simply open a file in your ASD folder and append the data received to it.

You could save the file as a CSV (comma separated values), which would mean post fixing the data value with a comma before appending it to the file. This would be advantageous if you later want the App to read the file and display a List or Chart.

If your data consists of more than one value at a time, ensure the values are comma delimited and postfix that data with a newline: \n before appending the file.

Edit: The ASD (App Specific Directory) is the default folder in App Inventor.

1 Like

Hello Chris,

I tried to make an block like this.
I used text("1") because now I don't know how to convert short data into text.
Now I just want to know it can generate csv file.
I follow this guidance about the path but I couldn't see it. It seems like the file was not generated.

Please suggest me what should I do

Try this example:

1 Like


Thank you Juan.

After testing it then trying to search "example.txt" in my phone, I realize that I look into the wrong path before.

My path is different.

Appreciate your help.


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