two metawear data streaming
Hi,
How can i stream data from two sensors using the C# tutorial code? Now it works for one sensor and i would like to get data from two metawear sensors. this is the code:
public DeviceSetup()
{
InitializeComponent();
}
protected async override void OnNavigatedTo(NavigationEventArgs e) {
base.OnNavigatedTo(e);
metawear = MbientLab.MetaWear.Win10.Application.GetMetaWearBoard(e.Parameter as BluetoothLEDevice);
sensorFusion = metawear.GetModule<ISensorFusionBosch>();
sensorFusion.Configure();
await sensorFusion.Quaternion.AddRouteAsync(source =>
source.Stream(async data => await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.High, () =>
{
string quaternion = data.Value<Quaternion>().ToString();
})));
I tried to get it from the Android tutorial multimw, but don't understand it.
Many thanks,
Pieter
Comments
Pass in a
List<BluetoothLEDevice>
to that page and iterate over the elements.Alternatively, it might be easier to do this via a .NET Core command line app:
https://github.com/mbientlab/MetaWear-Tutorial-CSharp/blob/master/NetCoreExamples/StreamAccelerometer.cs
thanks! I will look into this.