how to connect Fitbit accelerometer to matlab

Hi to all, i'am trying to get data from a tri axial accelerometer using MATLAB.
My problem is that i don't know how connect my Fitbit accelerometer to matlab, please suggest me which function should i use to obtain data from accelerometer.
thanks in advance

2 Comments

Hi inti, Did you manage to connect your Fitbit accelerometer to Matlab. I tried many ways but unsuccessful. Could you please advise how you have done it.
Hey, has either of you figured out how to do it yet? I contacted the Fitbit company and they say raw accelerometer data is not accessible to anyone.

Sign in to comment.

 Accepted Answer

For the moment you could write an interface to libfitbit, perhaps using loadlib()
The formal FitBit API description is at https://wiki.fitbit.com/display/API/Fitbit+API
I do not see anything in the File Exchange designed to talk to FitBit devices.

6 Comments

Thanks for your quick reply.
by the way, i'm a newbie to Matlab.
in Fact, On a Windows 7 system, I plugged the device into the usb port after i installed the driver for it. it's neccessary to create an interface to libfitbit? Is-exist an command which allows me to plot the output data from my Fitbit accelerometer.
thanks in advance
The FitBit devices use a protocol that looks similar to HTTP. It is not as easy as just using fopen() on the device and having the device automatically start sending the data: you have to send a proper sequence of commands to it and get back responses. libfitbit knows how to do that already, but it is a C-compatible library rather than something that is already ready to call easily from MATLAB.
As you are on MS Windows there is the possibility that the driver you installed has an ActiveX control that could be called to get the data.
Did you have a look at http://www.fitbit.com/setup ? If the data files are on your system already, the effort is reduced.
inti
inti on 25 Dec 2013
Edited: inti on 25 Dec 2013
Thanks for your answer.
My Fitbit device (Fitbit Ultra) uses an ANT protocol, protocol like bluetooth. by doing a search in net, i saw that Libfitbit is supported just by Linux platform and not in Windows (https://github.com/openyou/libfitbit), in this case i don't know if i should using Linux pltaform and installing matlab there or how?
Question: Did you have a look at http://www.fitbit.com/setup ? If the data files are on your system already, the effort is reduced.
Response; by the way, I have a track that allows me to obtain monitoring data in spreadsheet( by using google drive) but the problem thaat somes parameters don't figures like : altimeter, speed...to this reason,i like showin all the output data in matlab to analyze it.
If the following page is correct: https://lwn.net/Articles/532410/ then your only option would appear to be to use https://github.com/paulburton/fitbitd . That might possibly only be for Linux.
It appears that at present users are not intended to have fine-grained access to the data, even though there are many reasons why it would make sense to allow that access.
inti
inti on 25 Dec 2013
Edited: Walter Roberson on 25 Dec 2013
Thanks for your response.
i found this script which collect and plot data from an instrument in real time at matlab ( http://www.mathworks.fr/matlabcentral/fileexchange/25519-collect-and-plot-data-from-an-instrument-in-real-time )? i think that it should just update it to work with Fitbit. what do you think about that?
thanks in advance
The protocol is not documented, so you would have to figure it out by reading the fitbitd source. The source you found was for a device that has a quite simple protocol.

Sign in to comment.

More Answers (1)

I don't think there's any way for you to do that. I've been in touch with the Fitbit company and they say raw accelerometer data is not accessible to anyone. There's just no way to access it. All you have is the result of the Fitbit software's processing of the accelerometer data: number of steps, stairs climbed etc.

Asked:

on 22 Dec 2013

Answered:

on 27 Oct 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!