Streaming from multiple Metawear devices
Hello dear friends,
Is there any explicit example on streaming from for example 2 Metawear devices at the same time?
I have already checked the "multimw" sample app but it doesn't work for me actually...
And as far as I know, there is nothing available on this topic in the Java API.
So, can anyone please enlighten me with some sort of basic code on this topic?
Comments
I have provided my code below... I am trying to have windows of length 250 over acc/gyro data from 2 boards. The problem is that when streaming, I get data only from one of the devices although the other one is connected and the Led module proves that.
` public class MainActivity extends AppCompatActivity implements ServiceConnection {
private static final int REQUEST_ENABLE_BT = 1;
private BtleService.LocalBinder serviceBinder;
// Sensor No.1 parameters. Sensor No.2 parameters are similar.
private final String MAC_ADDRESS_1 = "XX:XX:XX:XX:XX:XX";
private MetaWearBoard mwBoard1;
private Accelerometer accelerometer1;
private GyroBmi160 gyroscope1;
private Led led1;
private Settings settings1;
/* Signals Storage ========================================================================== */
private static final int DataLimit = 250;
public int counter = 0;
// Sensor No.1 linkedLists used as windows over data streams. Sensor No.2 windows are similarly defined.
public LinkedList accDataX1 = new LinkedList<>();
public LinkedList accDataY1 = new LinkedList<>();
public LinkedList accDataZ1 = new LinkedList<>();
public LinkedList gyroDataX1 = new LinkedList<>();
public LinkedList gyroDataY1 = new LinkedList<>();
public LinkedList gyroDataZ1 = new LinkedList<>();
} `
This is what the multimw example app is for. Start with that first and tell us why it's not working for you.
Thanks for your prompt response, Laura.
Actually, I could never build the app using the multimw source project and there was something wrong with the gradle file. I tried different gradle builds and different versions of mbient sdks with and also tried changing the min Android sdk required, for the later mbient sdks but no luck.
I have also noticed that the project has been removed from the following github repositories:
https://github.com/mbientlab/MetaWear-Tutorial-Android/tree/master/multimw
https://github.com/mbientlab/Metawear-SampleAndroidApp
is there a new working version of the multimw project available?
Actually you are using the outdated Apps which is the issue. The new App are here:
https://github.com/mbientlab/MetaWear-SDK-Android/blob/master/metawear.zip
https://github.com/mbientlab/MetaWear-SDK-Android/blob/master/examples.zip
Those should build just fine.
Thanks a lot Laura.