Page 1 of 1

question about Ble-Ti-SensorTag

Posted: 13:32, 10 Nov 2014
by Faith
Hello ereryone,

Sorry if this is a newbie question...

I have run the program of Ble-Ti-SensorTag. It works successfully. Now I want to save the data of magnetometer and accelerometer as a text document.

What can I do for that purpose ? How to modify the program ?

Thanks a lot.

Faith

Re: question about Ble-Ti-SensorTag

Posted: 11:28, 12 Nov 2014
by micke
Hi Faith,

Do you want to save the data as text files on the device? You can use the Cordova File API:

http://plugins.cordova.io/#/package/org ... rdova.file

Write to the text file when you get sensor data. You might want to buffer sensor data (store in a variable) and write in chunks to improve performance, but that kind of optimization can perhaps wait for later.

A first step is to get the File API working. Note that this API is NOT included with Evothings Client. You will have to build your own Cordova app for that. You can still use Evothings Workbench and get fast turn-around editing, check out this section in the documentation:

http://evothings.com/doc/build/cordova- ... rEvothings

Also check out this app for Android that does something similar (saving sensor data). I think that the source code is included with the APK-file (APKs are just ZIP-files you can open them and look inside), if not you could contact the author and ask for advice:

http://www.heartsome.de/de/android/andr ... ensor.html

Does the above help? Let me know how it goes.

Best, Mikael