I saw in the python tutorial that there is a written code for streaming data from the acc. is there an option to stream from both acc and gyr simultaneously?
I have very basic knowledge in writing code, but need it for some home assignment.
thanks.
Well there's a few issues.
1. First you need to make sure that the total frequency is <100Hz. Currently You might have set the acc to 100Hz so the gyro data won't come through. Fix that first.
2. Second, make sure there is a handler for the data callback for both the gyro and acc:
libmetawear.mbl_mw_datasignal_subscribe(acc, None, s.callback)
libmetawear.mbl_mw_datasignal_subscribe(gyro, None, s.callback)
The callback handles the data. The example uses the same callback but you can separate them if you want so that you can print a different output for the gyro versus the acc.
In the memory capacity calculator page, the sensor is able to support 800Hz data rate max. It is not true?
You said total < 100Hz; does it mean if I enable both acc and gyro, their total data rate must be < 100Hz. So 50 Hz each is the maximum MMR can provide?
If I only enable one reading either acc or gyro, is MMR able to deliver 800Hz data rate?
There are 2 modes of getting the data: (1) real time streaming, and (2) log first then download. I guess for very high data rate like 800Hz, is the 2nd mode better in teams of data loss? Because for downloading, you don't need to transmit 800 readings per second if Bluetooth is not running its max speed.
I read from another thread saying JavaScript is better and more reliable that Python for working with MetaWear. What is your opinion? I have just started working with MMR. Most likely I will be working in Ubuntu.
I have downloaded and built C++ SDK; however there is no sample app.
For the tutorials, you mean this one (https://mbientlab.com/tutorials/index.html), isn't it? I could not fine the part that specifies the logging and streaming data rate limit (800 & 100).
Comments
Yes, this is possible and you can go through our tutorials and example code.
However, if you are not comfortable with coding, you can achieve the same thing with our MetaBase App on the app stores.
In the Python SDK, there is example code like stream_acc_gyro.py, which is supposed to stream acc and gyro data from sensors in real time. @rotemg2
In the original code, the following lines are commented out. They are there to set range and sampling rate for acc and gyro, If I am not wrong.
My problem is I can only see data from acc. What is wrong here? @Laura
You can uncomment those lines. Remember it's just example code so you are expected to tweak it to your needs.
Make sure you subscribe to both signals and that you turn on the bmi.
Laura,
I believe the original code does subscribe to both signals and turn on the BMI.
The problem that I have is I only see acc data in data_handler if I enable both acc and gyro.
Why is it so?
My second question is if I subscribe to both, how do I differentiate acc from gyro in data_handler function?
Thx.
Well there's a few issues.
1. First you need to make sure that the total frequency is <100Hz. Currently You might have set the acc to 100Hz so the gyro data won't come through. Fix that first.
2. Second, make sure there is a handler for the data callback for both the gyro and acc:
libmetawear.mbl_mw_datasignal_subscribe(acc, None, s.callback)
libmetawear.mbl_mw_datasignal_subscribe(gyro, None, s.callback)
The callback handles the data. The example uses the same callback but you can separate them if you want so that you can print a different output for the gyro versus the acc.
@Laura,
I read from another thread saying JavaScript is better and more reliable that Python for working with MetaWear. What is your opinion? I have just started working with MMR. Most likely I will be working in Ubuntu.
I have downloaded and built C++ SDK; however there is no sample app.
For the tutorials, you mean this one (https://mbientlab.com/tutorials/index.html), isn't it? I could not fine the part that specifies the logging and streaming data rate limit (800 & 100).