Experimental Setup: I use Huawei smartphone for Central and DA14583 IoT sensor as peripheral. The software running on the smartphone is an app using Evothing framework. I would like to read acceleration and angular velocity at the same time to do the motion capture.
Sensor's firmaware: IoT raw project.
Sample rate for accelerometer and gyroscope: 50Hz.
The code on the central device using Evothing is as follows:
//Received data
app.handleSensorAccelerometer = function (data) {
data["time"] = Date.now();
data["type"] = "Accelerometer";
app.data.Accelerometer.push(data);
document.getElementById("sensor-accelerometer-count").innerHTML = app.data.Accelerometer.length;
}
app.handleSensorGyroscope = function (data) {
data["time"] = Date.now();
data["type"] = "Gyroscope";
app.data.Gyroscope.push(data);
document.getElementById("sensor-gyroscope-count").innerHTML = app.data.Gyroscope.length;
}
Problems: The accelerometer and gyroscope can not be synchronized. Usually, the data from gyroscope is less than the data from accelerometer.
Questions: Till now, I find that Evothing only provide two callback interface function, app.handleSensorAccelerometer() and handleSensorGyroscope(). The method I currently use for synchronization is to keep posting the data from accelerometer and gyroscope to two arrays respectively . As a result, the data are not strictly synchronized, just by random. Usually, the gyroscope's data is less than acclerometer 's data when sampling a period. My question is that how can I synchronize two sensors or eliminate my former errors?
Best Regards,
Elvis
Dear All,
Peripheral: I run the RAW project on the DA14583 IoT sensor.
Central: Android phone with evothing software.
Phenomenon: When I test the accelerometer, everything goes well. However, when I test the gyroscope. The gyroscope can not send data to the mobile phone unless the sensor move.
Questions:
1.Is this the problem about saving energy? Since I would like to fuse both accelerometer data and gyroscope data. I would like to send angular velocity (0,0,0) if there is no value for the gyroscope.
2. If it is the problem of energy saving, how can I close it to make that both the accelerometer and gyroscope output together even the sensor is stable and does not move.
Best Regards,
Yufan