I've been working on a small wrapper library that allows these metwaer sensors to work directly with matlab. There is still some problems with the implementation that needs to be cleaned up and at the moment, but this is mostly just a basic implementation that shows that this works. There are still some fairly outstanding bugs that I need to work out before this is a viable library to use. I wanted to see what people think about this and any suggestions or help would be appreciated.
There is also the problem of proper documentation and licensing.
sensor = metawear('connect','DB:04:F4:40:20:56'); metawear('enable_accelerometer',sensor); %metawear('configure_accelerometer',sensor,4,25); %metawear("enable_accelerometer",'DB:04:F4:40:20:56'); [epoch,x,y,z] = metawear('query_accelerometer',sensor);
This discussion has been closed.
I've cleaned up some of the configuration problems and I have something that works fairly well. I have some plans to support more of the api. I'll have to write some matlab code to wrap the mexw file. This should improve the usability of the library. At the moment the library is only capable of streaming from the gyro and the accelerometer. I'll open it up to the rest of the sensors once I work out a sane way to handle the multiple signals. I'm also looking into a server setup for building.
I updated the api a bit and restructured everything a bit. I will probably work on providing some binaries but the library is still unstable. the handler for connecting the sensor to ble has a chance to crash Matlab.
here is some sample code from the base implementation but I would prefer if the library was wrapper in a matlab library for usability.
Cool! Any further info on this?
It's pretty rough around the edges and you need to compile the mex code to use this. I haven't had time but I would like to wrap the whole thing in a matlab wrapper to hide the C++ api.
Just saw a post on LI on this too. Great job!!! Checking this out...
Keep us updated on this.
For now we have a workaround we published that leverages our Python APIs and uses a TCP socket to stream data into Matlab: https://mbientlab.com/tutorials/Matlab.html
might make sense to replicate the python API with this library. I would need to rework the api to an extent. I would like to have someone review the library and suggest changes. I'll have more time after finals.The code is available here: https://github.com/GaitRehabilitation/mex-metawear